This is page 169 of 182. Use http://codebase.md/xmlui-org/xmlui/assets/img/%7B$item.flickr_images[0]%7D?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ ├── config.json
│ └── true-jeans-agree.md
├── .eslintrc.cjs
├── .github
│ ├── build-checklist.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows
│ ├── deploy-blog.yml
│ ├── deploy-docs-optimized.yml
│ ├── deploy-docs.yml
│ ├── prepare-versions.yml
│ ├── release-packages.yml
│ ├── run-all-tests.yml
│ └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│ ├── launch.json
│ └── settings.json
├── blog
│ ├── .gitignore
│ ├── .gitkeep
│ ├── CHANGELOG.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── blog
│ │ │ ├── images
│ │ │ │ ├── blog-page-component.png
│ │ │ │ ├── blog-scrabble.png
│ │ │ │ ├── integrated-blog-search.png
│ │ │ │ └── lorem-ipsum.png
│ │ │ ├── lorem-ipsum.md
│ │ │ ├── newest-post.md
│ │ │ ├── older-post.md
│ │ │ └── welcome-to-the-xmlui-blog.md
│ │ ├── mockServiceWorker.js
│ │ ├── resources
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ └── for-download
│ │ │ │ └── xmlui
│ │ │ │ └── xmlui-standalone.umd.js
│ │ │ ├── github.svg
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ ├── rss.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ └── PageNotFound.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── blog-theme.ts
│ └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── ComponentRefLinks.txt
│ ├── content
│ │ ├── _meta.json
│ │ ├── components
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── APICall.md
│ │ │ ├── App.md
│ │ │ ├── AppHeader.md
│ │ │ ├── AppState.md
│ │ │ ├── AutoComplete.md
│ │ │ ├── Avatar.md
│ │ │ ├── Backdrop.md
│ │ │ ├── Badge.md
│ │ │ ├── BarChart.md
│ │ │ ├── Bookmark.md
│ │ │ ├── Breakout.md
│ │ │ ├── Button.md
│ │ │ ├── Card.md
│ │ │ ├── Carousel.md
│ │ │ ├── ChangeListener.md
│ │ │ ├── Checkbox.md
│ │ │ ├── CHStack.md
│ │ │ ├── ColorPicker.md
│ │ │ ├── Column.md
│ │ │ ├── ContentSeparator.md
│ │ │ ├── CVStack.md
│ │ │ ├── DataSource.md
│ │ │ ├── DateInput.md
│ │ │ ├── DatePicker.md
│ │ │ ├── DonutChart.md
│ │ │ ├── DropdownMenu.md
│ │ │ ├── EmojiSelector.md
│ │ │ ├── ExpandableItem.md
│ │ │ ├── FileInput.md
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FlowLayout.md
│ │ │ ├── Footer.md
│ │ │ ├── Form.md
│ │ │ ├── FormItem.md
│ │ │ ├── FormSection.md
│ │ │ ├── Fragment.md
│ │ │ ├── H1.md
│ │ │ ├── H2.md
│ │ │ ├── H3.md
│ │ │ ├── H4.md
│ │ │ ├── H5.md
│ │ │ ├── H6.md
│ │ │ ├── Heading.md
│ │ │ ├── HSplitter.md
│ │ │ ├── HStack.md
│ │ │ ├── Icon.md
│ │ │ ├── IFrame.md
│ │ │ ├── Image.md
│ │ │ ├── Items.md
│ │ │ ├── LabelList.md
│ │ │ ├── Legend.md
│ │ │ ├── LineChart.md
│ │ │ ├── Link.md
│ │ │ ├── List.md
│ │ │ ├── Logo.md
│ │ │ ├── Markdown.md
│ │ │ ├── MenuItem.md
│ │ │ ├── MenuSeparator.md
│ │ │ ├── ModalDialog.md
│ │ │ ├── NavGroup.md
│ │ │ ├── NavLink.md
│ │ │ ├── NavPanel.md
│ │ │ ├── NoResult.md
│ │ │ ├── NumberBox.md
│ │ │ ├── Option.md
│ │ │ ├── Page.md
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── Pages.md
│ │ │ ├── Pagination.md
│ │ │ ├── PasswordInput.md
│ │ │ ├── PieChart.md
│ │ │ ├── ProgressBar.md
│ │ │ ├── Queue.md
│ │ │ ├── RadioGroup.md
│ │ │ ├── RealTimeAdapter.md
│ │ │ ├── Redirect.md
│ │ │ ├── Select.md
│ │ │ ├── Slider.md
│ │ │ ├── Slot.md
│ │ │ ├── SpaceFiller.md
│ │ │ ├── Spinner.md
│ │ │ ├── Splitter.md
│ │ │ ├── Stack.md
│ │ │ ├── StickyBox.md
│ │ │ ├── SubMenuItem.md
│ │ │ ├── Switch.md
│ │ │ ├── TabItem.md
│ │ │ ├── Table.md
│ │ │ ├── TableOfContents.md
│ │ │ ├── Tabs.md
│ │ │ ├── Text.md
│ │ │ ├── TextArea.md
│ │ │ ├── TextBox.md
│ │ │ ├── Theme.md
│ │ │ ├── TimeInput.md
│ │ │ ├── Timer.md
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneSwitch.md
│ │ │ ├── Tooltip.md
│ │ │ ├── Tree.md
│ │ │ ├── VSplitter.md
│ │ │ ├── VStack.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ ├── xmlui-spreadsheet
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Spreadsheet.md
│ │ │ └── xmlui-website-blocks
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Carousel.md
│ │ │ ├── HelloMd.md
│ │ │ ├── HeroSection.md
│ │ │ └── ScrollToTop.md
│ │ └── extensions
│ │ ├── _meta.json
│ │ ├── xmlui-animations
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Animation.md
│ │ │ ├── FadeAnimation.md
│ │ │ ├── FadeInAnimation.md
│ │ │ ├── FadeOutAnimation.md
│ │ │ ├── ScaleAnimation.md
│ │ │ └── SlideInAnimation.md
│ │ └── xmlui-website-blocks
│ │ ├── _meta.json
│ │ ├── _overview.md
│ │ ├── Carousel.md
│ │ ├── HelloMd.md
│ │ ├── HeroSection.md
│ │ └── ScrollToTop.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── feed.rss
│ │ ├── mockServiceWorker.js
│ │ ├── pages
│ │ │ ├── _meta.json
│ │ │ ├── app-structure.md
│ │ │ ├── build-editor-component.md
│ │ │ ├── build-hello-world-component.md
│ │ │ ├── components-intro.md
│ │ │ ├── context-variables.md
│ │ │ ├── forms.md
│ │ │ ├── globals.md
│ │ │ ├── glossary.md
│ │ │ ├── helper-tags.md
│ │ │ ├── hosted-deployment.md
│ │ │ ├── howto
│ │ │ │ ├── assign-a-complex-json-literal-to-a-component-variable.md
│ │ │ │ ├── chain-a-refetch.md
│ │ │ │ ├── control-cache-invalidation.md
│ │ │ │ ├── debug-a-component.md
│ │ │ │ ├── delay-a-datasource-until-another-datasource-is-ready.md
│ │ │ │ ├── delegate-a-method.md
│ │ │ │ ├── do-custom-form-validation.md
│ │ │ │ ├── expose-a-method-from-a-component.md
│ │ │ │ ├── filter-and-transform-data-from-an-api.md
│ │ │ │ ├── group-items-in-list-by-a-property.md
│ │ │ │ ├── handle-background-operations.md
│ │ │ │ ├── hide-an-element-until-its-datasource-is-ready.md
│ │ │ │ ├── make-a-set-of-equal-width-cards.md
│ │ │ │ ├── make-a-table-responsive.md
│ │ │ │ ├── make-navpanel-width-responsive.md
│ │ │ │ ├── modify-a-value-reported-in-a-column.md
│ │ │ │ ├── paginate-a-list.md
│ │ │ │ ├── pass-data-to-a-modal-dialog.md
│ │ │ │ ├── react-to-button-click-not-keystrokes.md
│ │ │ │ ├── set-the-initial-value-of-a-select-from-fetched-data.md
│ │ │ │ ├── share-a-modaldialog-across-components.md
│ │ │ │ ├── sync-selections-between-table-and-list-views.md
│ │ │ │ ├── update-ui-optimistically.md
│ │ │ │ ├── use-built-in-form-validation.md
│ │ │ │ └── use-the-same-modaldialog-to-add-or-edit.md
│ │ │ ├── howto.md
│ │ │ ├── intro.md
│ │ │ ├── layout.md
│ │ │ ├── markup.md
│ │ │ ├── mcp.md
│ │ │ ├── modal-dialogs.md
│ │ │ ├── news-and-reviews.md
│ │ │ ├── reactive-intro.md
│ │ │ ├── refactoring.md
│ │ │ ├── routing-and-links.md
│ │ │ ├── samples
│ │ │ │ ├── color-palette.xmlui
│ │ │ │ ├── color-values.xmlui
│ │ │ │ ├── shadow-sizes.xmlui
│ │ │ │ ├── spacing-sizes.xmlui
│ │ │ │ ├── swatch.xmlui
│ │ │ │ ├── theme-gallery-brief.xmlui
│ │ │ │ └── theme-gallery.xmlui
│ │ │ ├── scoping.md
│ │ │ ├── scripting.md
│ │ │ ├── styles-and-themes
│ │ │ │ ├── common-units.md
│ │ │ │ ├── layout-props.md
│ │ │ │ ├── theme-variable-defaults.md
│ │ │ │ ├── theme-variables.md
│ │ │ │ └── themes.md
│ │ │ ├── template-properties.md
│ │ │ ├── test.md
│ │ │ ├── tutorial-01.md
│ │ │ ├── tutorial-02.md
│ │ │ ├── tutorial-03.md
│ │ │ ├── tutorial-04.md
│ │ │ ├── tutorial-05.md
│ │ │ ├── tutorial-06.md
│ │ │ ├── tutorial-07.md
│ │ │ ├── tutorial-08.md
│ │ │ ├── tutorial-09.md
│ │ │ ├── tutorial-10.md
│ │ │ ├── tutorial-11.md
│ │ │ ├── tutorial-12.md
│ │ │ ├── universal-properties.md
│ │ │ ├── user-defined-components.md
│ │ │ ├── vscode.md
│ │ │ ├── working-with-markdown.md
│ │ │ ├── working-with-text.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-charts
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── DonutChart.md
│ │ │ │ ├── LabelList.md
│ │ │ │ ├── Legend.md
│ │ │ │ ├── LineChart.md
│ │ │ │ └── PieChart.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ └── xmlui-spreadsheet
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ └── Spreadsheet.md
│ │ ├── resources
│ │ │ ├── devdocs
│ │ │ │ ├── debug-proxy-object-2.png
│ │ │ │ ├── debug-proxy-object.png
│ │ │ │ ├── table_editor_01.png
│ │ │ │ ├── table_editor_02.png
│ │ │ │ ├── table_editor_03.png
│ │ │ │ ├── table_editor_04.png
│ │ │ │ ├── table_editor_05.png
│ │ │ │ ├── table_editor_06.png
│ │ │ │ ├── table_editor_07.png
│ │ │ │ ├── table_editor_08.png
│ │ │ │ ├── table_editor_09.png
│ │ │ │ ├── table_editor_10.png
│ │ │ │ ├── table_editor_11.png
│ │ │ │ ├── table-editor-01.png
│ │ │ │ ├── table-editor-02.png
│ │ │ │ ├── table-editor-03.png
│ │ │ │ ├── table-editor-04.png
│ │ │ │ ├── table-editor-06.png
│ │ │ │ ├── table-editor-07.png
│ │ │ │ ├── table-editor-08.png
│ │ │ │ ├── table-editor-09.png
│ │ │ │ └── xmlui-rendering-of-tiptap-markdown.png
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ ├── clients.json
│ │ │ │ ├── daily-revenue.json
│ │ │ │ ├── dashboard-stats.json
│ │ │ │ ├── demo.xmlui
│ │ │ │ ├── demo.xmlui.xs
│ │ │ │ ├── downloads
│ │ │ │ │ └── downloads.json
│ │ │ │ ├── for-download
│ │ │ │ │ ├── index-with-api.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── mockApi.js
│ │ │ │ │ ├── start-darwin.sh
│ │ │ │ │ ├── start-linux.sh
│ │ │ │ │ ├── start.bat
│ │ │ │ │ └── xmlui
│ │ │ │ │ └── xmlui-standalone.umd.js
│ │ │ │ ├── getting-started
│ │ │ │ │ ├── cl-tutorial-final.zip
│ │ │ │ │ ├── cl-tutorial.zip
│ │ │ │ │ ├── cl-tutorial2.zip
│ │ │ │ │ ├── cl-tutorial3.zip
│ │ │ │ │ ├── cl-tutorial4.zip
│ │ │ │ │ ├── cl-tutorial5.zip
│ │ │ │ │ ├── cl-tutorial6.zip
│ │ │ │ │ ├── getting-started.zip
│ │ │ │ │ ├── hello-xmlui.zip
│ │ │ │ │ ├── xmlui-empty.zip
│ │ │ │ │ └── xmlui-starter.zip
│ │ │ │ ├── howto
│ │ │ │ │ └── component-icons
│ │ │ │ │ └── up-arrow.svg
│ │ │ │ ├── invoices.json
│ │ │ │ ├── monthly-status.json
│ │ │ │ ├── news-and-reviews.json
│ │ │ │ ├── products.json
│ │ │ │ ├── releases.json
│ │ │ │ ├── tutorials
│ │ │ │ │ ├── datasource
│ │ │ │ │ │ └── api.ts
│ │ │ │ │ └── p2do
│ │ │ │ │ ├── api.ts
│ │ │ │ │ └── todo-logo.svg
│ │ │ │ └── xmlui.json
│ │ │ ├── github.svg
│ │ │ ├── images
│ │ │ │ ├── apiaction-tutorial
│ │ │ │ │ ├── add-success.png
│ │ │ │ │ ├── apiaction-param.png
│ │ │ │ │ ├── change-completed.png
│ │ │ │ │ ├── change-in-progress.png
│ │ │ │ │ ├── confirm-delete.png
│ │ │ │ │ ├── data-error.png
│ │ │ │ │ ├── data-progress.png
│ │ │ │ │ ├── data-success.png
│ │ │ │ │ ├── display-1.png
│ │ │ │ │ ├── item-deleted.png
│ │ │ │ │ ├── item-updated.png
│ │ │ │ │ ├── missing-api-key.png
│ │ │ │ │ ├── new-item-added.png
│ │ │ │ │ └── test-message.png
│ │ │ │ ├── chat-api
│ │ │ │ │ └── domain-model.svg
│ │ │ │ ├── components
│ │ │ │ │ ├── image
│ │ │ │ │ │ └── breakfast.jpg
│ │ │ │ │ ├── markdown
│ │ │ │ │ │ └── colors.png
│ │ │ │ │ └── modal
│ │ │ │ │ ├── deep_link_dialog_1.jpg
│ │ │ │ │ └── deep_link_dialog_2.jpg
│ │ │ │ ├── create-apps
│ │ │ │ │ ├── collapsed-vertical.png
│ │ │ │ │ ├── using-forms-warning-dialog.png
│ │ │ │ │ └── using-forms.png
│ │ │ │ ├── datasource-tutorial
│ │ │ │ │ ├── data-with-header.png
│ │ │ │ │ ├── filtered-data.png
│ │ │ │ │ ├── filtered-items.png
│ │ │ │ │ ├── initial-page-items.png
│ │ │ │ │ ├── list-items.png
│ │ │ │ │ ├── next-page-items.png
│ │ │ │ │ ├── no-data.png
│ │ │ │ │ ├── pagination-1.jpg
│ │ │ │ │ ├── pagination-1.png
│ │ │ │ │ ├── polling-1.png
│ │ │ │ │ ├── refetch-data.png
│ │ │ │ │ ├── slow-loading.png
│ │ │ │ │ ├── test-message.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── unconventional-data.png
│ │ │ │ │ └── unfiltered-items.png
│ │ │ │ ├── flower.jpg
│ │ │ │ ├── get-started
│ │ │ │ │ ├── add-new-contact.png
│ │ │ │ │ ├── app-modified.png
│ │ │ │ │ ├── app-start.png
│ │ │ │ │ ├── app-with-boxes.png
│ │ │ │ │ ├── app-with-toast.png
│ │ │ │ │ ├── boilerplate-structure.png
│ │ │ │ │ ├── cl-initial.png
│ │ │ │ │ ├── cl-start.png
│ │ │ │ │ ├── contact-counts.png
│ │ │ │ │ ├── contact-dialog-title.png
│ │ │ │ │ ├── contact-dialog.png
│ │ │ │ │ ├── contact-menus.png
│ │ │ │ │ ├── contact-predicates.png
│ │ │ │ │ ├── context-menu.png
│ │ │ │ │ ├── dashboard-numbers.png
│ │ │ │ │ ├── default-contact-list.png
│ │ │ │ │ ├── delete-contact.png
│ │ │ │ │ ├── delete-task.png
│ │ │ │ │ ├── detailed-template.png
│ │ │ │ │ ├── edit-contact-details.png
│ │ │ │ │ ├── edited-contact-saved.png
│ │ │ │ │ ├── empty-sections.png
│ │ │ │ │ ├── filter-completed.png
│ │ │ │ │ ├── fullwidth-desktop.png
│ │ │ │ │ ├── fullwidth-mobile.png
│ │ │ │ │ ├── initial-table.png
│ │ │ │ │ ├── items-and-badges.png
│ │ │ │ │ ├── loading-message.png
│ │ │ │ │ ├── new-contact-button.png
│ │ │ │ │ ├── new-contact-saved.png
│ │ │ │ │ ├── no-empty-sections.png
│ │ │ │ │ ├── personal-todo-initial.png
│ │ │ │ │ ├── piechart.png
│ │ │ │ │ ├── review-today.png
│ │ │ │ │ ├── rudimentary-dashboard.png
│ │ │ │ │ ├── section-collapsed.png
│ │ │ │ │ ├── sectioned-items.png
│ │ │ │ │ ├── sections-ordered.png
│ │ │ │ │ ├── spacex-list-with-links.png
│ │ │ │ │ ├── spacex-list.png
│ │ │ │ │ ├── start-personal-todo-1.png
│ │ │ │ │ ├── submit-new-contact.png
│ │ │ │ │ ├── submit-new-task.png
│ │ │ │ │ ├── syntax-highlighting.png
│ │ │ │ │ ├── table-with-badge.png
│ │ │ │ │ ├── template-with-card.png
│ │ │ │ │ ├── test-emulated-api.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── todo-logo.png
│ │ │ │ │ └── xmlui-tools.png
│ │ │ │ ├── HelloApp.png
│ │ │ │ ├── HelloApp2.png
│ │ │ │ ├── logos
│ │ │ │ │ ├── xmlui1.svg
│ │ │ │ │ ├── xmlui2.svg
│ │ │ │ │ ├── xmlui3.svg
│ │ │ │ │ ├── xmlui4.svg
│ │ │ │ │ ├── xmlui5.svg
│ │ │ │ │ ├── xmlui6.svg
│ │ │ │ │ └── xmlui7.svg
│ │ │ │ ├── pdf
│ │ │ │ │ └── dummy-pdf.jpg
│ │ │ │ ├── rendering-engine
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ ├── Component.svg
│ │ │ │ │ ├── CompoundComponent.svg
│ │ │ │ │ ├── RootComponent.svg
│ │ │ │ │ └── tree-with-containers.svg
│ │ │ │ ├── reviewers-guide
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ └── incbutton-in-action.png
│ │ │ │ ├── tools
│ │ │ │ │ └── boilerplate-structure.png
│ │ │ │ ├── try.svg
│ │ │ │ ├── tutorial
│ │ │ │ │ ├── app-chat-history.png
│ │ │ │ │ ├── app-content-placeholder.png
│ │ │ │ │ ├── app-header-and-content.png
│ │ │ │ │ ├── app-links-channel-selected.png
│ │ │ │ │ ├── app-links-click.png
│ │ │ │ │ ├── app-navigation.png
│ │ │ │ │ ├── finished-ex01.png
│ │ │ │ │ ├── finished-ex02.png
│ │ │ │ │ ├── hello.png
│ │ │ │ │ ├── splash-screen-advanced.png
│ │ │ │ │ ├── splash-screen-after-click.png
│ │ │ │ │ ├── splash-screen-centered.png
│ │ │ │ │ ├── splash-screen-events.png
│ │ │ │ │ ├── splash-screen-expression.png
│ │ │ │ │ ├── splash-screen-reuse-after.png
│ │ │ │ │ ├── splash-screen-reuse-before.png
│ │ │ │ │ └── splash-screen.png
│ │ │ │ └── tutorial-01.png
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ ├── Boxes.xmlui
│ │ │ ├── Breadcrumb.xmlui
│ │ │ ├── ChangeLog.xmlui
│ │ │ ├── ColorPalette.xmlui
│ │ │ ├── DocumentLinks.xmlui
│ │ │ ├── DocumentPage.xmlui
│ │ │ ├── DocumentPageNoTOC.xmlui
│ │ │ ├── Icons.xmlui
│ │ │ ├── IncButton.xmlui
│ │ │ ├── IncButton2.xmlui
│ │ │ ├── NameValue.xmlui
│ │ │ ├── PageNotFound.xmlui
│ │ │ ├── PaletteItem.xmlui
│ │ │ ├── Palettes.xmlui
│ │ │ ├── SectionHeader.xmlui
│ │ │ ├── TBD.xmlui
│ │ │ ├── Test.xmlui
│ │ │ ├── ThemesIntro.xmlui
│ │ │ ├── ThousandThemes.xmlui
│ │ │ ├── TubeStops.xmlui
│ │ │ ├── TubeStops.xmlui.xs
│ │ │ └── TwoColumnCode.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ ├── docs-theme.ts
│ │ ├── earthtone.ts
│ │ ├── xmlui-gray-on-default.ts
│ │ ├── xmlui-green-on-default.ts
│ │ └── xmlui-orange-on-default.ts
│ └── tsconfig.json
├── LICENSE
├── package-lock.json
├── package.json
├── packages
│ ├── xmlui-animations
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── Animation.tsx
│ │ │ ├── AnimationNative.tsx
│ │ │ ├── FadeAnimation.tsx
│ │ │ ├── FadeInAnimation.tsx
│ │ │ ├── FadeOutAnimation.tsx
│ │ │ ├── index.tsx
│ │ │ ├── ScaleAnimation.tsx
│ │ │ └── SlideInAnimation.tsx
│ │ └── tsconfig.json
│ ├── xmlui-devtools
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── devtools
│ │ │ │ ├── DevTools.tsx
│ │ │ │ ├── DevToolsNative.module.scss
│ │ │ │ ├── DevToolsNative.tsx
│ │ │ │ ├── ModalDialog.module.scss
│ │ │ │ ├── ModalDialog.tsx
│ │ │ │ ├── ModalVisibilityContext.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── editor
│ │ │ │ └── Editor.tsx
│ │ │ └── index.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config-overrides.ts
│ ├── xmlui-hello-world
│ │ ├── .gitignore
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── HelloWorld.module.scss
│ │ │ ├── HelloWorld.tsx
│ │ │ ├── HelloWorldNative.tsx
│ │ │ └── index.tsx
│ │ └── tsconfig.json
│ ├── xmlui-os-frames
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── index.tsx
│ │ │ ├── IPhoneFrame.module.scss
│ │ │ ├── IPhoneFrame.tsx
│ │ │ ├── MacOSAppFrame.module.scss
│ │ │ ├── MacOSAppFrame.tsx
│ │ │ ├── WindowsAppFrame.module.scss
│ │ │ └── WindowsAppFrame.tsx
│ │ └── tsconfig.json
│ ├── xmlui-pdf
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ ├── components
│ │ │ │ └── Pdf.xmlui
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── index.tsx
│ │ │ ├── LazyPdfNative.tsx
│ │ │ ├── Pdf.module.scss
│ │ │ └── Pdf.tsx
│ │ └── tsconfig.json
│ ├── xmlui-playground
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── hooks
│ │ │ │ ├── usePlayground.ts
│ │ │ │ └── useToast.ts
│ │ │ ├── index.tsx
│ │ │ ├── playground
│ │ │ │ ├── Box.module.scss
│ │ │ │ ├── Box.tsx
│ │ │ │ ├── CodeSelector.tsx
│ │ │ │ ├── ConfirmationDialog.module.scss
│ │ │ │ ├── ConfirmationDialog.tsx
│ │ │ │ ├── Editor.tsx
│ │ │ │ ├── Header.module.scss
│ │ │ │ ├── Header.tsx
│ │ │ │ ├── Playground.tsx
│ │ │ │ ├── PlaygroundContent.module.scss
│ │ │ │ ├── PlaygroundContent.tsx
│ │ │ │ ├── PlaygroundNative.module.scss
│ │ │ │ ├── PlaygroundNative.tsx
│ │ │ │ ├── Preview.module.scss
│ │ │ │ ├── Preview.tsx
│ │ │ │ ├── Select.module.scss
│ │ │ │ ├── StandalonePlayground.tsx
│ │ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ │ ├── ThemeSwitcher.module.scss
│ │ │ │ ├── ThemeSwitcher.tsx
│ │ │ │ ├── ToneSwitcher.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── providers
│ │ │ │ ├── Toast.module.scss
│ │ │ │ └── ToastProvider.tsx
│ │ │ ├── state
│ │ │ │ └── store.ts
│ │ │ ├── themes
│ │ │ │ └── theme.ts
│ │ │ └── utils
│ │ │ └── helpers.ts
│ │ └── tsconfig.json
│ ├── xmlui-search
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── index.tsx
│ │ │ ├── Search.module.scss
│ │ │ └── Search.tsx
│ │ └── tsconfig.json
│ ├── xmlui-spreadsheet
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── index.tsx
│ │ │ ├── Spreadsheet.tsx
│ │ │ └── SpreadsheetNative.tsx
│ │ └── tsconfig.json
│ └── xmlui-website-blocks
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── demo
│ │ ├── components
│ │ │ ├── HeroBackgroundBreakoutPage.xmlui
│ │ │ ├── HeroBackgroundsPage.xmlui
│ │ │ ├── HeroContentsPage.xmlui
│ │ │ ├── HeroTextAlignPage.xmlui
│ │ │ ├── HeroTextPage.xmlui
│ │ │ └── HeroTonesPage.xmlui
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── default.ts
│ ├── index.html
│ ├── index.ts
│ ├── meta
│ │ └── componentsMetadata.ts
│ ├── package.json
│ ├── public
│ │ └── resources
│ │ ├── building.jpg
│ │ └── xmlui-logo.svg
│ ├── src
│ │ ├── Carousel
│ │ │ ├── Carousel.module.scss
│ │ │ ├── Carousel.tsx
│ │ │ ├── CarouselContext.tsx
│ │ │ └── CarouselNative.tsx
│ │ ├── FancyButton
│ │ │ ├── FancyButton.module.scss
│ │ │ ├── FancyButton.tsx
│ │ │ └── FancyButton.xmlui
│ │ ├── Hello
│ │ │ ├── Hello.tsx
│ │ │ ├── Hello.xmlui
│ │ │ └── Hello.xmlui.xs
│ │ ├── HeroSection
│ │ │ ├── HeroSection.module.scss
│ │ │ ├── HeroSection.tsx
│ │ │ └── HeroSectionNative.tsx
│ │ ├── index.tsx
│ │ ├── ScrollToTop
│ │ │ ├── ScrollToTop.module.scss
│ │ │ ├── ScrollToTop.tsx
│ │ │ └── ScrollToTopNative.tsx
│ │ └── vite-env.d.ts
│ └── tsconfig.json
├── README.md
├── tools
│ ├── codefence
│ │ └── xmlui-code-fence-docs.md
│ ├── create-app
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── create-app.ts
│ │ ├── helpers
│ │ │ ├── copy.ts
│ │ │ ├── get-pkg-manager.ts
│ │ │ ├── git.ts
│ │ │ ├── install.ts
│ │ │ ├── is-folder-empty.ts
│ │ │ ├── is-writeable.ts
│ │ │ ├── make-dir.ts
│ │ │ └── validate-pkg.ts
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── templates
│ │ │ ├── default
│ │ │ │ └── ts
│ │ │ │ ├── gitignore
│ │ │ │ ├── index.html
│ │ │ │ ├── index.ts
│ │ │ │ ├── public
│ │ │ │ │ ├── mockServiceWorker.js
│ │ │ │ │ ├── resources
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ └── xmlui-logo.svg
│ │ │ │ │ └── serve.json
│ │ │ │ └── src
│ │ │ │ ├── components
│ │ │ │ │ ├── ApiAware.xmlui
│ │ │ │ │ ├── Home.xmlui
│ │ │ │ │ ├── IncButton.xmlui
│ │ │ │ │ └── PagePanel.xmlui
│ │ │ │ ├── config.ts
│ │ │ │ └── Main.xmlui
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── create-xmlui-hello-world
│ │ ├── index.js
│ │ └── package.json
│ └── vscode
│ ├── .gitignore
│ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── .vscodeignore
│ ├── build.sh
│ ├── CHANGELOG.md
│ ├── esbuild.js
│ ├── eslint.config.mjs
│ ├── formatter-docs.md
│ ├── generate-test-sample.sh
│ ├── LICENSE.md
│ ├── package-lock.json
│ ├── package.json
│ ├── README.md
│ ├── resources
│ │ ├── xmlui-logo.png
│ │ └── xmlui-markup-syntax-highlighting.png
│ ├── src
│ │ ├── extension.ts
│ │ └── server.ts
│ ├── syntaxes
│ │ └── xmlui.tmLanguage.json
│ ├── test-samples
│ │ └── sample.xmlui
│ ├── tsconfig.json
│ └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
├── .gitignore
├── bin
│ ├── bootstrap.js
│ ├── build-lib.ts
│ ├── build.ts
│ ├── index.ts
│ ├── preview.ts
│ ├── start.ts
│ ├── vite-xmlui-plugin.ts
│ └── viteConfig.ts
├── CHANGELOG.md
├── conventions
│ ├── component-qa-checklist.md
│ ├── copilot-conventions.md
│ ├── create-xmlui-components.md
│ ├── mermaid.md
│ ├── testing-conventions.md
│ └── xmlui-in-a-nutshell.md
├── dev-docs
│ ├── accessibility.md
│ ├── build-system.md
│ ├── build-xmlui.md
│ ├── component-behaviors.md
│ ├── components-with-options.md
│ ├── containers.md
│ ├── data-operations.md
│ ├── glossary.md
│ ├── index.md
│ ├── next
│ │ ├── component-dev-guide.md
│ │ ├── configuration-management-enhancement-summary.md
│ │ ├── documentation-scripts-refactoring-complete-summary.md
│ │ ├── documentation-scripts-refactoring-plan.md
│ │ ├── duplicate-pattern-extraction-summary.md
│ │ ├── error-handling-standardization-summary.md
│ │ ├── generating-component-reference.md
│ │ ├── index.md
│ │ ├── logging-consistency-implementation-summary.md
│ │ ├── project-build.md
│ │ ├── project-structure.md
│ │ ├── theme-context.md
│ │ ├── tiptap-design-considerations.md
│ │ ├── working-with-code.md
│ │ ├── xmlui-runtime-architecture
│ │ └── xmlui-wcag-accessibility-report.md
│ ├── react-fundamentals.md
│ ├── release-method.md
│ ├── standalone-app.md
│ ├── ud-components.md
│ └── xmlui-repo.md
├── package.json
├── playwright.config.ts
├── scripts
│ ├── coverage-only.js
│ ├── e2e-test-summary.js
│ ├── generate-docs
│ │ ├── build-downloads-map.mjs
│ │ ├── build-pages-map.mjs
│ │ ├── components-config.json
│ │ ├── configuration-management.mjs
│ │ ├── constants.mjs
│ │ ├── create-theme-files.mjs
│ │ ├── DocsGenerator.mjs
│ │ ├── error-handling.mjs
│ │ ├── extensions-config.json
│ │ ├── folders.mjs
│ │ ├── generate-summary-files.mjs
│ │ ├── get-docs.mjs
│ │ ├── input-handler.mjs
│ │ ├── logger.mjs
│ │ ├── logging-standards.mjs
│ │ ├── MetadataProcessor.mjs
│ │ ├── pattern-utilities.mjs
│ │ └── utils.mjs
│ ├── get-langserver-metadata.mjs
│ ├── inline-links.mjs
│ └── README-e2e-summary.md
├── src
│ ├── abstractions
│ │ ├── _conventions.md
│ │ ├── ActionDefs.ts
│ │ ├── AppContextDefs.ts
│ │ ├── ComponentDefs.ts
│ │ ├── ContainerDefs.ts
│ │ ├── ExtensionDefs.ts
│ │ ├── FunctionDefs.ts
│ │ ├── RendererDefs.ts
│ │ ├── scripting
│ │ │ ├── BlockScope.ts
│ │ │ ├── Compilation.ts
│ │ │ ├── LogicalThread.ts
│ │ │ ├── LoopScope.ts
│ │ │ ├── modules.ts
│ │ │ ├── ScriptParserError.ts
│ │ │ ├── Token.ts
│ │ │ ├── TryScope.ts
│ │ │ └── TryScopeExp.ts
│ │ └── ThemingDefs.ts
│ ├── components
│ │ ├── _conventions.md
│ │ ├── abstractions.ts
│ │ ├── Accordion
│ │ │ ├── Accordion.md
│ │ │ ├── Accordion.module.scss
│ │ │ ├── Accordion.spec.ts
│ │ │ ├── Accordion.tsx
│ │ │ ├── AccordionContext.tsx
│ │ │ ├── AccordionItem.tsx
│ │ │ ├── AccordionItemNative.tsx
│ │ │ └── AccordionNative.tsx
│ │ ├── Animation
│ │ │ └── AnimationNative.tsx
│ │ ├── APICall
│ │ │ ├── APICall.md
│ │ │ ├── APICall.spec.ts
│ │ │ ├── APICall.tsx
│ │ │ └── APICallNative.tsx
│ │ ├── App
│ │ │ ├── App.md
│ │ │ ├── App.module.scss
│ │ │ ├── App.spec.ts
│ │ │ ├── App.tsx
│ │ │ ├── AppLayoutContext.ts
│ │ │ ├── AppNative.tsx
│ │ │ ├── AppStateContext.ts
│ │ │ ├── doc-resources
│ │ │ │ ├── condensed-sticky.xmlui
│ │ │ │ ├── condensed.xmlui
│ │ │ │ ├── horizontal-sticky.xmlui
│ │ │ │ ├── horizontal.xmlui
│ │ │ │ ├── vertical-full-header.xmlui
│ │ │ │ ├── vertical-sticky.xmlui
│ │ │ │ └── vertical.xmlui
│ │ │ ├── IndexerContext.ts
│ │ │ ├── LinkInfoContext.ts
│ │ │ ├── SearchContext.tsx
│ │ │ ├── Sheet.module.scss
│ │ │ └── Sheet.tsx
│ │ ├── AppHeader
│ │ │ ├── AppHeader.md
│ │ │ ├── AppHeader.module.scss
│ │ │ ├── AppHeader.spec.ts
│ │ │ ├── AppHeader.tsx
│ │ │ └── AppHeaderNative.tsx
│ │ ├── AppState
│ │ │ ├── AppState.md
│ │ │ ├── AppState.spec.ts
│ │ │ ├── AppState.tsx
│ │ │ └── AppStateNative.tsx
│ │ ├── AutoComplete
│ │ │ ├── AutoComplete.md
│ │ │ ├── AutoComplete.module.scss
│ │ │ ├── AutoComplete.spec.ts
│ │ │ ├── AutoComplete.tsx
│ │ │ ├── AutoCompleteContext.tsx
│ │ │ └── AutoCompleteNative.tsx
│ │ ├── Avatar
│ │ │ ├── Avatar.md
│ │ │ ├── Avatar.module.scss
│ │ │ ├── Avatar.spec.ts
│ │ │ ├── Avatar.tsx
│ │ │ └── AvatarNative.tsx
│ │ ├── Backdrop
│ │ │ ├── Backdrop.md
│ │ │ ├── Backdrop.module.scss
│ │ │ ├── Backdrop.spec.ts
│ │ │ ├── Backdrop.tsx
│ │ │ └── BackdropNative.tsx
│ │ ├── Badge
│ │ │ ├── Badge.md
│ │ │ ├── Badge.module.scss
│ │ │ ├── Badge.spec.ts
│ │ │ ├── Badge.tsx
│ │ │ └── BadgeNative.tsx
│ │ ├── Bookmark
│ │ │ ├── Bookmark.md
│ │ │ ├── Bookmark.module.scss
│ │ │ ├── Bookmark.spec.ts
│ │ │ ├── Bookmark.tsx
│ │ │ └── BookmarkNative.tsx
│ │ ├── Breakout
│ │ │ ├── Breakout.module.scss
│ │ │ ├── Breakout.spec.ts
│ │ │ ├── Breakout.tsx
│ │ │ └── BreakoutNative.tsx
│ │ ├── Button
│ │ │ ├── Button-style.spec.ts
│ │ │ ├── Button.md
│ │ │ ├── Button.module.scss
│ │ │ ├── Button.spec.ts
│ │ │ ├── Button.tsx
│ │ │ └── ButtonNative.tsx
│ │ ├── Card
│ │ │ ├── Card.md
│ │ │ ├── Card.module.scss
│ │ │ ├── Card.spec.ts
│ │ │ ├── Card.tsx
│ │ │ └── CardNative.tsx
│ │ ├── Carousel
│ │ │ ├── Carousel.md
│ │ │ ├── Carousel.module.scss
│ │ │ ├── Carousel.spec.ts
│ │ │ ├── Carousel.tsx
│ │ │ ├── CarouselContext.tsx
│ │ │ ├── CarouselItem.tsx
│ │ │ ├── CarouselItemNative.tsx
│ │ │ └── CarouselNative.tsx
│ │ ├── ChangeListener
│ │ │ ├── ChangeListener.md
│ │ │ ├── ChangeListener.spec.ts
│ │ │ ├── ChangeListener.tsx
│ │ │ └── ChangeListenerNative.tsx
│ │ ├── chart-color-schemes.ts
│ │ ├── Charts
│ │ │ ├── AreaChart
│ │ │ │ ├── AreaChart.md
│ │ │ │ ├── AreaChart.spec.ts
│ │ │ │ ├── AreaChart.tsx
│ │ │ │ └── AreaChartNative.tsx
│ │ │ ├── BarChart
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── BarChart.module.scss
│ │ │ │ ├── BarChart.spec.ts
│ │ │ │ ├── BarChart.tsx
│ │ │ │ └── BarChartNative.tsx
│ │ │ ├── DonutChart
│ │ │ │ ├── DonutChart.spec.ts
│ │ │ │ └── DonutChart.tsx
│ │ │ ├── LabelList
│ │ │ │ ├── LabelList.spec.ts
│ │ │ │ ├── LabelList.tsx
│ │ │ │ ├── LabelListNative.module.scss
│ │ │ │ └── LabelListNative.tsx
│ │ │ ├── Legend
│ │ │ │ ├── Legend.spec.ts
│ │ │ │ ├── Legend.tsx
│ │ │ │ └── LegendNative.tsx
│ │ │ ├── LineChart
│ │ │ │ ├── LineChart.md
│ │ │ │ ├── LineChart.module.scss
│ │ │ │ ├── LineChart.spec.ts
│ │ │ │ ├── LineChart.tsx
│ │ │ │ └── LineChartNative.tsx
│ │ │ ├── PieChart
│ │ │ │ ├── PieChart.md
│ │ │ │ ├── PieChart.spec.ts
│ │ │ │ ├── PieChart.tsx
│ │ │ │ ├── PieChartNative.module.scss
│ │ │ │ └── PieChartNative.tsx
│ │ │ ├── RadarChart
│ │ │ │ ├── RadarChart.md
│ │ │ │ ├── RadarChart.spec.ts
│ │ │ │ ├── RadarChart.tsx
│ │ │ │ └── RadarChartNative.tsx
│ │ │ ├── Tooltip
│ │ │ │ ├── TooltipContent.module.scss
│ │ │ │ ├── TooltipContent.spec.ts
│ │ │ │ └── TooltipContent.tsx
│ │ │ └── utils
│ │ │ ├── abstractions.ts
│ │ │ └── ChartProvider.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.md
│ │ │ ├── Checkbox.spec.ts
│ │ │ └── Checkbox.tsx
│ │ ├── CodeBlock
│ │ │ ├── CodeBlock.module.scss
│ │ │ ├── CodeBlock.spec.ts
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── CodeBlockNative.tsx
│ │ │ └── highlight-code.ts
│ │ ├── collectedComponentMetadata.ts
│ │ ├── ColorPicker
│ │ │ ├── ColorPicker.md
│ │ │ ├── ColorPicker.module.scss
│ │ │ ├── ColorPicker.spec.ts
│ │ │ ├── ColorPicker.tsx
│ │ │ └── ColorPickerNative.tsx
│ │ ├── Column
│ │ │ ├── Column.md
│ │ │ ├── Column.tsx
│ │ │ ├── ColumnNative.tsx
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ └── TableContext.tsx
│ │ ├── component-utils.ts
│ │ ├── ComponentProvider.tsx
│ │ ├── ComponentRegistryContext.tsx
│ │ ├── container-helpers.tsx
│ │ ├── ContentSeparator
│ │ │ ├── ContentSeparator.md
│ │ │ ├── ContentSeparator.module.scss
│ │ │ ├── ContentSeparator.spec.ts
│ │ │ ├── ContentSeparator.tsx
│ │ │ └── ContentSeparatorNative.tsx
│ │ ├── DataSource
│ │ │ ├── DataSource.md
│ │ │ └── DataSource.tsx
│ │ ├── DateInput
│ │ │ ├── DateInput.md
│ │ │ ├── DateInput.module.scss
│ │ │ ├── DateInput.spec.ts
│ │ │ ├── DateInput.tsx
│ │ │ └── DateInputNative.tsx
│ │ ├── DatePicker
│ │ │ ├── DatePicker.md
│ │ │ ├── DatePicker.module.scss
│ │ │ ├── DatePicker.spec.ts
│ │ │ ├── DatePicker.tsx
│ │ │ └── DatePickerNative.tsx
│ │ ├── DropdownMenu
│ │ │ ├── DropdownMenu.md
│ │ │ ├── DropdownMenu.module.scss
│ │ │ ├── DropdownMenu.spec.ts
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── DropdownMenuNative.tsx
│ │ │ ├── MenuItem.md
│ │ │ └── SubMenuItem.md
│ │ ├── EmojiSelector
│ │ │ ├── EmojiSelector.md
│ │ │ ├── EmojiSelector.spec.ts
│ │ │ ├── EmojiSelector.tsx
│ │ │ └── EmojiSelectorNative.tsx
│ │ ├── ExpandableItem
│ │ │ ├── ExpandableItem.module.scss
│ │ │ ├── ExpandableItem.spec.ts
│ │ │ ├── ExpandableItem.tsx
│ │ │ └── ExpandableItemNative.tsx
│ │ ├── FileInput
│ │ │ ├── FileInput.md
│ │ │ ├── FileInput.module.scss
│ │ │ ├── FileInput.spec.ts
│ │ │ ├── FileInput.tsx
│ │ │ └── FileInputNative.tsx
│ │ ├── FileUploadDropZone
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FileUploadDropZone.module.scss
│ │ │ ├── FileUploadDropZone.spec.ts
│ │ │ ├── FileUploadDropZone.tsx
│ │ │ └── FileUploadDropZoneNative.tsx
│ │ ├── FlowLayout
│ │ │ ├── FlowLayout.md
│ │ │ ├── FlowLayout.module.scss
│ │ │ ├── FlowLayout.spec.ts
│ │ │ ├── FlowLayout.spec.ts-snapshots
│ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
│ │ │ ├── FlowLayout.tsx
│ │ │ └── FlowLayoutNative.tsx
│ │ ├── Footer
│ │ │ ├── Footer.md
│ │ │ ├── Footer.module.scss
│ │ │ ├── Footer.spec.ts
│ │ │ ├── Footer.tsx
│ │ │ └── FooterNative.tsx
│ │ ├── Form
│ │ │ ├── Form.md
│ │ │ ├── Form.module.scss
│ │ │ ├── Form.spec.ts
│ │ │ ├── Form.tsx
│ │ │ ├── formActions.ts
│ │ │ ├── FormContext.ts
│ │ │ └── FormNative.tsx
│ │ ├── FormItem
│ │ │ ├── FormItem.md
│ │ │ ├── FormItem.module.scss
│ │ │ ├── FormItem.spec.ts
│ │ │ ├── FormItem.tsx
│ │ │ ├── FormItemNative.tsx
│ │ │ ├── HelperText.module.scss
│ │ │ ├── HelperText.tsx
│ │ │ ├── ItemWithLabel.tsx
│ │ │ └── Validations.ts
│ │ ├── FormSection
│ │ │ ├── FormSection.md
│ │ │ ├── FormSection.ts
│ │ │ └── FormSection.xmlui
│ │ ├── Fragment
│ │ │ ├── Fragment.spec.ts
│ │ │ └── Fragment.tsx
│ │ ├── Heading
│ │ │ ├── abstractions.ts
│ │ │ ├── H1.md
│ │ │ ├── H1.spec.ts
│ │ │ ├── H2.md
│ │ │ ├── H2.spec.ts
│ │ │ ├── H3.md
│ │ │ ├── H3.spec.ts
│ │ │ ├── H4.md
│ │ │ ├── H4.spec.ts
│ │ │ ├── H5.md
│ │ │ ├── H5.spec.ts
│ │ │ ├── H6.md
│ │ │ ├── H6.spec.ts
│ │ │ ├── Heading.md
│ │ │ ├── Heading.module.scss
│ │ │ ├── Heading.spec.ts
│ │ │ ├── Heading.tsx
│ │ │ └── HeadingNative.tsx
│ │ ├── HoverCard
│ │ │ ├── HoverCard.tsx
│ │ │ └── HovercardNative.tsx
│ │ ├── HtmlTags
│ │ │ ├── HtmlTags.module.scss
│ │ │ ├── HtmlTags.spec.ts
│ │ │ └── HtmlTags.tsx
│ │ ├── Icon
│ │ │ ├── AdmonitionDanger.tsx
│ │ │ ├── AdmonitionInfo.tsx
│ │ │ ├── AdmonitionNote.tsx
│ │ │ ├── AdmonitionTip.tsx
│ │ │ ├── AdmonitionWarning.tsx
│ │ │ ├── ApiIcon.tsx
│ │ │ ├── ArrowDropDown.module.scss
│ │ │ ├── ArrowDropDown.tsx
│ │ │ ├── ArrowDropUp.module.scss
│ │ │ ├── ArrowDropUp.tsx
│ │ │ ├── ArrowLeft.module.scss
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowRight.module.scss
│ │ │ ├── ArrowRight.tsx
│ │ │ ├── Attach.tsx
│ │ │ ├── Binding.module.scss
│ │ │ ├── Binding.tsx
│ │ │ ├── BoardIcon.tsx
│ │ │ ├── BoxIcon.tsx
│ │ │ ├── CheckIcon.tsx
│ │ │ ├── ChevronDownIcon.tsx
│ │ │ ├── ChevronLeft.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUpIcon.tsx
│ │ │ ├── CodeFileIcon.tsx
│ │ │ ├── CodeSandbox.tsx
│ │ │ ├── CompactListIcon.tsx
│ │ │ ├── ContentCopyIcon.tsx
│ │ │ ├── DarkToLightIcon.tsx
│ │ │ ├── DatabaseIcon.module.scss
│ │ │ ├── DatabaseIcon.tsx
│ │ │ ├── DocFileIcon.tsx
│ │ │ ├── DocIcon.tsx
│ │ │ ├── DotMenuHorizontalIcon.tsx
│ │ │ ├── DotMenuIcon.tsx
│ │ │ ├── EmailIcon.tsx
│ │ │ ├── EmptyFolderIcon.tsx
│ │ │ ├── ErrorIcon.tsx
│ │ │ ├── ExpressionIcon.tsx
│ │ │ ├── FillPlusCricleIcon.tsx
│ │ │ ├── FilterIcon.tsx
│ │ │ ├── FolderIcon.tsx
│ │ │ ├── GlobeIcon.tsx
│ │ │ ├── HomeIcon.tsx
│ │ │ ├── HyperLinkIcon.tsx
│ │ │ ├── Icon.md
│ │ │ ├── Icon.module.scss
│ │ │ ├── Icon.spec.ts
│ │ │ ├── Icon.tsx
│ │ │ ├── IconNative.tsx
│ │ │ ├── ImageFileIcon.tsx
│ │ │ ├── Inspect.tsx
│ │ │ ├── LightToDark.tsx
│ │ │ ├── LinkIcon.tsx
│ │ │ ├── ListIcon.tsx
│ │ │ ├── LooseListIcon.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── MoreOptionsIcon.tsx
│ │ │ ├── NoSortIcon.tsx
│ │ │ ├── PDFIcon.tsx
│ │ │ ├── PenIcon.tsx
│ │ │ ├── PhoneIcon.tsx
│ │ │ ├── PhotoIcon.tsx
│ │ │ ├── PlusIcon.tsx
│ │ │ ├── SearchIcon.tsx
│ │ │ ├── ShareIcon.tsx
│ │ │ ├── SortAscendingIcon.tsx
│ │ │ ├── SortDescendingIcon.tsx
│ │ │ ├── StarsIcon.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ ├── svg
│ │ │ │ ├── admonition_danger.svg
│ │ │ │ ├── admonition_info.svg
│ │ │ │ ├── admonition_note.svg
│ │ │ │ ├── admonition_tip.svg
│ │ │ │ ├── admonition_warning.svg
│ │ │ │ ├── api.svg
│ │ │ │ ├── arrow-dropdown.svg
│ │ │ │ ├── arrow-left.svg
│ │ │ │ ├── arrow-right.svg
│ │ │ │ ├── arrow-up.svg
│ │ │ │ ├── attach.svg
│ │ │ │ ├── binding.svg
│ │ │ │ ├── box.svg
│ │ │ │ ├── bulb.svg
│ │ │ │ ├── code-file.svg
│ │ │ │ ├── code-sandbox.svg
│ │ │ │ ├── dark_to_light.svg
│ │ │ │ ├── database.svg
│ │ │ │ ├── doc.svg
│ │ │ │ ├── empty-folder.svg
│ │ │ │ ├── expression.svg
│ │ │ │ ├── eye-closed.svg
│ │ │ │ ├── eye-dark.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── file-text.svg
│ │ │ │ ├── filter.svg
│ │ │ │ ├── folder.svg
│ │ │ │ ├── img.svg
│ │ │ │ ├── inspect.svg
│ │ │ │ ├── light_to_dark.svg
│ │ │ │ ├── moon.svg
│ │ │ │ ├── pdf.svg
│ │ │ │ ├── photo.svg
│ │ │ │ ├── share.svg
│ │ │ │ ├── stars.svg
│ │ │ │ ├── sun.svg
│ │ │ │ ├── trending-down.svg
│ │ │ │ ├── trending-level.svg
│ │ │ │ ├── trending-up.svg
│ │ │ │ ├── txt.svg
│ │ │ │ ├── unknown-file.svg
│ │ │ │ ├── unlink.svg
│ │ │ │ └── xls.svg
│ │ │ ├── TableDeleteColumnIcon.tsx
│ │ │ ├── TableDeleteRowIcon.tsx
│ │ │ ├── TableInsertColumnIcon.tsx
│ │ │ ├── TableInsertRowIcon.tsx
│ │ │ ├── TrashIcon.tsx
│ │ │ ├── TrendingDownIcon.tsx
│ │ │ ├── TrendingLevelIcon.tsx
│ │ │ ├── TrendingUpIcon.tsx
│ │ │ ├── TxtIcon.tsx
│ │ │ ├── UnknownFileIcon.tsx
│ │ │ ├── UnlinkIcon.tsx
│ │ │ ├── UserIcon.tsx
│ │ │ ├── WarningIcon.tsx
│ │ │ └── XlsIcon.tsx
│ │ ├── IconProvider.tsx
│ │ ├── IconRegistryContext.tsx
│ │ ├── IFrame
│ │ │ ├── IFrame.md
│ │ │ ├── IFrame.module.scss
│ │ │ ├── IFrame.spec.ts
│ │ │ ├── IFrame.tsx
│ │ │ └── IFrameNative.tsx
│ │ ├── Image
│ │ │ ├── Image.md
│ │ │ ├── Image.module.scss
│ │ │ ├── Image.spec.ts
│ │ │ ├── Image.tsx
│ │ │ └── ImageNative.tsx
│ │ ├── Input
│ │ │ ├── index.ts
│ │ │ ├── InputAdornment.module.scss
│ │ │ ├── InputAdornment.tsx
│ │ │ ├── InputDivider.module.scss
│ │ │ ├── InputDivider.tsx
│ │ │ ├── InputLabel.module.scss
│ │ │ ├── InputLabel.tsx
│ │ │ ├── PartialInput.module.scss
│ │ │ └── PartialInput.tsx
│ │ ├── InspectButton
│ │ │ ├── InspectButton.module.scss
│ │ │ └── InspectButton.tsx
│ │ ├── Items
│ │ │ ├── Items.md
│ │ │ ├── Items.spec.ts
│ │ │ ├── Items.tsx
│ │ │ └── ItemsNative.tsx
│ │ ├── Link
│ │ │ ├── Link.md
│ │ │ ├── Link.module.scss
│ │ │ ├── Link.spec.ts
│ │ │ ├── Link.tsx
│ │ │ └── LinkNative.tsx
│ │ ├── List
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── List.md
│ │ │ ├── List.module.scss
│ │ │ ├── List.spec.ts
│ │ │ ├── List.tsx
│ │ │ └── ListNative.tsx
│ │ ├── Logo
│ │ │ ├── doc-resources
│ │ │ │ └── xmlui-logo.svg
│ │ │ ├── Logo.md
│ │ │ ├── Logo.tsx
│ │ │ └── LogoNative.tsx
│ │ ├── Markdown
│ │ │ ├── CodeText.module.scss
│ │ │ ├── CodeText.tsx
│ │ │ ├── Markdown.md
│ │ │ ├── Markdown.module.scss
│ │ │ ├── Markdown.spec.ts
│ │ │ ├── Markdown.tsx
│ │ │ ├── MarkdownNative.tsx
│ │ │ ├── parse-binding-expr.ts
│ │ │ └── utils.ts
│ │ ├── metadata-helpers.ts
│ │ ├── ModalDialog
│ │ │ ├── ConfirmationModalContextProvider.tsx
│ │ │ ├── Dialog.module.scss
│ │ │ ├── Dialog.tsx
│ │ │ ├── ModalDialog.md
│ │ │ ├── ModalDialog.module.scss
│ │ │ ├── ModalDialog.spec.ts
│ │ │ ├── ModalDialog.tsx
│ │ │ ├── ModalDialogNative.tsx
│ │ │ └── ModalVisibilityContext.tsx
│ │ ├── NavGroup
│ │ │ ├── NavGroup.md
│ │ │ ├── NavGroup.module.scss
│ │ │ ├── NavGroup.spec.ts
│ │ │ ├── NavGroup.tsx
│ │ │ ├── NavGroupContext.ts
│ │ │ └── NavGroupNative.tsx
│ │ ├── NavLink
│ │ │ ├── NavLink.md
│ │ │ ├── NavLink.module.scss
│ │ │ ├── NavLink.spec.ts
│ │ │ ├── NavLink.tsx
│ │ │ └── NavLinkNative.tsx
│ │ ├── NavPanel
│ │ │ ├── NavPanel.md
│ │ │ ├── NavPanel.module.scss
│ │ │ ├── NavPanel.spec.ts
│ │ │ ├── NavPanel.tsx
│ │ │ └── NavPanelNative.tsx
│ │ ├── NestedApp
│ │ │ ├── AppWithCodeView.module.scss
│ │ │ ├── AppWithCodeView.tsx
│ │ │ ├── AppWithCodeViewNative.tsx
│ │ │ ├── defaultProps.tsx
│ │ │ ├── logo.svg
│ │ │ ├── NestedApp.module.scss
│ │ │ ├── NestedApp.tsx
│ │ │ ├── NestedAppNative.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── NoResult
│ │ │ ├── NoResult.md
│ │ │ ├── NoResult.module.scss
│ │ │ ├── NoResult.spec.ts
│ │ │ ├── NoResult.tsx
│ │ │ └── NoResultNative.tsx
│ │ ├── NumberBox
│ │ │ ├── numberbox-abstractions.ts
│ │ │ ├── NumberBox.md
│ │ │ ├── NumberBox.module.scss
│ │ │ ├── NumberBox.spec.ts
│ │ │ ├── NumberBox.tsx
│ │ │ └── NumberBoxNative.tsx
│ │ ├── Option
│ │ │ ├── Option.md
│ │ │ ├── Option.spec.ts
│ │ │ ├── Option.tsx
│ │ │ ├── OptionNative.tsx
│ │ │ └── OptionTypeProvider.tsx
│ │ ├── PageMetaTitle
│ │ │ ├── PageMetaTilteNative.tsx
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── PageMetaTitle.spec.ts
│ │ │ └── PageMetaTitle.tsx
│ │ ├── Pages
│ │ │ ├── Page.md
│ │ │ ├── Pages.md
│ │ │ ├── Pages.module.scss
│ │ │ ├── Pages.tsx
│ │ │ └── PagesNative.tsx
│ │ ├── Pagination
│ │ │ ├── Pagination.md
│ │ │ ├── Pagination.module.scss
│ │ │ ├── Pagination.spec.ts
│ │ │ ├── Pagination.tsx
│ │ │ └── PaginationNative.tsx
│ │ ├── PositionedContainer
│ │ │ ├── PositionedContainer.module.scss
│ │ │ ├── PositionedContainer.tsx
│ │ │ └── PositionedContainerNative.tsx
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.module.scss
│ │ │ └── ProfileMenu.tsx
│ │ ├── ProgressBar
│ │ │ ├── ProgressBar.md
│ │ │ ├── ProgressBar.module.scss
│ │ │ ├── ProgressBar.spec.ts
│ │ │ ├── ProgressBar.tsx
│ │ │ └── ProgressBarNative.tsx
│ │ ├── Queue
│ │ │ ├── Queue.md
│ │ │ ├── Queue.spec.ts
│ │ │ ├── Queue.tsx
│ │ │ ├── queueActions.ts
│ │ │ └── QueueNative.tsx
│ │ ├── RadioGroup
│ │ │ ├── RadioGroup.md
│ │ │ ├── RadioGroup.module.scss
│ │ │ ├── RadioGroup.spec.ts
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioGroupNative.tsx
│ │ │ ├── RadioItem.tsx
│ │ │ └── RadioItemNative.tsx
│ │ ├── RealTimeAdapter
│ │ │ ├── RealTimeAdapter.tsx
│ │ │ └── RealTimeAdapterNative.tsx
│ │ ├── Redirect
│ │ │ ├── Redirect.md
│ │ │ ├── Redirect.spec.ts
│ │ │ └── Redirect.tsx
│ │ ├── ResponsiveBar
│ │ │ ├── README.md
│ │ │ ├── ResponsiveBar.md
│ │ │ ├── ResponsiveBar.module.scss
│ │ │ ├── ResponsiveBar.spec.ts
│ │ │ ├── ResponsiveBar.tsx
│ │ │ └── ResponsiveBarNative.tsx
│ │ ├── Select
│ │ │ ├── HiddenOption.tsx
│ │ │ ├── OptionContext.ts
│ │ │ ├── Select.md
│ │ │ ├── Select.module.scss
│ │ │ ├── Select.spec.ts
│ │ │ ├── Select.tsx
│ │ │ ├── SelectContext.tsx
│ │ │ └── SelectNative.tsx
│ │ ├── SelectionStore
│ │ │ ├── SelectionStore.md
│ │ │ ├── SelectionStore.tsx
│ │ │ └── SelectionStoreNative.tsx
│ │ ├── Slider
│ │ │ ├── Slider.md
│ │ │ ├── Slider.module.scss
│ │ │ ├── Slider.spec.ts
│ │ │ ├── Slider.tsx
│ │ │ └── SliderNative.tsx
│ │ ├── Slot
│ │ │ ├── Slot.md
│ │ │ ├── Slot.spec.ts
│ │ │ └── Slot.ts
│ │ ├── SlotItem.tsx
│ │ ├── SpaceFiller
│ │ │ ├── SpaceFiller.md
│ │ │ ├── SpaceFiller.module.scss
│ │ │ ├── SpaceFiller.spec.ts
│ │ │ ├── SpaceFiller.tsx
│ │ │ └── SpaceFillerNative.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.md
│ │ │ ├── Spinner.module.scss
│ │ │ ├── Spinner.spec.ts
│ │ │ ├── Spinner.tsx
│ │ │ └── SpinnerNative.tsx
│ │ ├── Splitter
│ │ │ ├── HSplitter.md
│ │ │ ├── HSplitter.spec.ts
│ │ │ ├── Splitter.md
│ │ │ ├── Splitter.module.scss
│ │ │ ├── Splitter.spec.ts
│ │ │ ├── Splitter.tsx
│ │ │ ├── SplitterNative.tsx
│ │ │ ├── utils.ts
│ │ │ ├── VSplitter.md
│ │ │ └── VSplitter.spec.ts
│ │ ├── Stack
│ │ │ ├── CHStack.md
│ │ │ ├── CHStack.spec.ts
│ │ │ ├── CVStack.md
│ │ │ ├── CVStack.spec.ts
│ │ │ ├── HStack.md
│ │ │ ├── HStack.spec.ts
│ │ │ ├── Stack.md
│ │ │ ├── Stack.module.scss
│ │ │ ├── Stack.spec.ts
│ │ │ ├── Stack.tsx
│ │ │ ├── StackNative.tsx
│ │ │ ├── VStack.md
│ │ │ └── VStack.spec.ts
│ │ ├── StickyBox
│ │ │ ├── StickyBox.md
│ │ │ ├── StickyBox.module.scss
│ │ │ ├── StickyBox.tsx
│ │ │ └── StickyBoxNative.tsx
│ │ ├── Switch
│ │ │ ├── Switch.md
│ │ │ ├── Switch.spec.ts
│ │ │ └── Switch.tsx
│ │ ├── Table
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── react-table-config.d.ts
│ │ │ ├── Table.md
│ │ │ ├── Table.module.scss
│ │ │ ├── Table.spec.ts
│ │ │ ├── Table.tsx
│ │ │ ├── TableNative.tsx
│ │ │ └── useRowSelection.tsx
│ │ ├── TableOfContents
│ │ │ ├── TableOfContents.module.scss
│ │ │ ├── TableOfContents.spec.ts
│ │ │ ├── TableOfContents.tsx
│ │ │ └── TableOfContentsNative.tsx
│ │ ├── Tabs
│ │ │ ├── TabContext.tsx
│ │ │ ├── TabItem.md
│ │ │ ├── TabItem.tsx
│ │ │ ├── TabItemNative.tsx
│ │ │ ├── Tabs.md
│ │ │ ├── Tabs.module.scss
│ │ │ ├── Tabs.spec.ts
│ │ │ ├── Tabs.tsx
│ │ │ └── TabsNative.tsx
│ │ ├── Text
│ │ │ ├── Text.md
│ │ │ ├── Text.module.scss
│ │ │ ├── Text.spec.ts
│ │ │ ├── Text.tsx
│ │ │ └── TextNative.tsx
│ │ ├── TextArea
│ │ │ ├── TextArea.md
│ │ │ ├── TextArea.module.scss
│ │ │ ├── TextArea.spec.ts
│ │ │ ├── TextArea.tsx
│ │ │ ├── TextAreaNative.tsx
│ │ │ ├── TextAreaResizable.tsx
│ │ │ └── useComposedRef.ts
│ │ ├── TextBox
│ │ │ ├── TextBox.md
│ │ │ ├── TextBox.module.scss
│ │ │ ├── TextBox.spec.ts
│ │ │ ├── TextBox.tsx
│ │ │ └── TextBoxNative.tsx
│ │ ├── Theme
│ │ │ ├── NotificationToast.tsx
│ │ │ ├── Theme.md
│ │ │ ├── Theme.module.scss
│ │ │ ├── Theme.spec.ts
│ │ │ ├── Theme.tsx
│ │ │ └── ThemeNative.tsx
│ │ ├── TimeInput
│ │ │ ├── TimeInput.md
│ │ │ ├── TimeInput.module.scss
│ │ │ ├── TimeInput.spec.ts
│ │ │ ├── TimeInput.tsx
│ │ │ ├── TimeInputNative.tsx
│ │ │ └── utils.ts
│ │ ├── Timer
│ │ │ ├── Timer.md
│ │ │ ├── Timer.spec.ts
│ │ │ ├── Timer.tsx
│ │ │ └── TimerNative.tsx
│ │ ├── Toggle
│ │ │ ├── Toggle.module.scss
│ │ │ └── Toggle.tsx
│ │ ├── ToneChangerButton
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneChangerButton.spec.ts
│ │ │ └── ToneChangerButton.tsx
│ │ ├── ToneSwitch
│ │ │ ├── ToneSwitch.md
│ │ │ ├── ToneSwitch.module.scss
│ │ │ ├── ToneSwitch.spec.ts
│ │ │ ├── ToneSwitch.tsx
│ │ │ └── ToneSwitchNative.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.md
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.spec.ts
│ │ │ ├── Tooltip.tsx
│ │ │ └── TooltipNative.tsx
│ │ ├── Tree
│ │ │ ├── testData.ts
│ │ │ ├── Tree-dynamic.spec.ts
│ │ │ ├── Tree-icons.spec.ts
│ │ │ ├── Tree.md
│ │ │ ├── Tree.spec.ts
│ │ │ ├── TreeComponent.module.scss
│ │ │ ├── TreeComponent.tsx
│ │ │ └── TreeNative.tsx
│ │ ├── TreeDisplay
│ │ │ ├── TreeDisplay.md
│ │ │ ├── TreeDisplay.module.scss
│ │ │ ├── TreeDisplay.tsx
│ │ │ └── TreeDisplayNative.tsx
│ │ ├── ValidationSummary
│ │ │ ├── ValidationSummary.module.scss
│ │ │ └── ValidationSummary.tsx
│ │ └── VisuallyHidden.tsx
│ ├── components-core
│ │ ├── abstractions
│ │ │ ├── ComponentRenderer.ts
│ │ │ ├── LoaderRenderer.ts
│ │ │ ├── standalone.ts
│ │ │ └── treeAbstractions.ts
│ │ ├── action
│ │ │ ├── actions.ts
│ │ │ ├── APICall.tsx
│ │ │ ├── FileDownloadAction.tsx
│ │ │ ├── FileUploadAction.tsx
│ │ │ ├── NavigateAction.tsx
│ │ │ └── TimedAction.tsx
│ │ ├── ApiBoundComponent.tsx
│ │ ├── appContext
│ │ │ ├── date-functions.ts
│ │ │ ├── math-function.ts
│ │ │ └── misc-utils.ts
│ │ ├── AppContext.tsx
│ │ ├── behaviors
│ │ │ ├── Behavior.tsx
│ │ │ └── CoreBehaviors.tsx
│ │ ├── component-hooks.ts
│ │ ├── ComponentDecorator.tsx
│ │ ├── ComponentViewer.tsx
│ │ ├── CompoundComponent.tsx
│ │ ├── constants.ts
│ │ ├── DebugViewProvider.tsx
│ │ ├── descriptorHelper.ts
│ │ ├── devtools
│ │ │ ├── InspectorDialog.module.scss
│ │ │ ├── InspectorDialog.tsx
│ │ │ └── InspectorDialogVisibilityContext.tsx
│ │ ├── EngineError.ts
│ │ ├── event-handlers.ts
│ │ ├── InspectorButton.module.scss
│ │ ├── InspectorContext.tsx
│ │ ├── interception
│ │ │ ├── abstractions.ts
│ │ │ ├── ApiInterceptor.ts
│ │ │ ├── ApiInterceptorProvider.tsx
│ │ │ ├── apiInterceptorWorker.ts
│ │ │ ├── Backend.ts
│ │ │ ├── Errors.ts
│ │ │ ├── IndexedDb.ts
│ │ │ ├── initMock.ts
│ │ │ ├── InMemoryDb.ts
│ │ │ ├── ReadonlyCollection.ts
│ │ │ └── useApiInterceptorContext.tsx
│ │ ├── loader
│ │ │ ├── ApiLoader.tsx
│ │ │ ├── DataLoader.tsx
│ │ │ ├── ExternalDataLoader.tsx
│ │ │ ├── Loader.tsx
│ │ │ ├── MockLoaderRenderer.tsx
│ │ │ └── PageableLoader.tsx
│ │ ├── LoaderComponent.tsx
│ │ ├── markup-check.ts
│ │ ├── parts.ts
│ │ ├── renderers.ts
│ │ ├── rendering
│ │ │ ├── AppContent.tsx
│ │ │ ├── AppRoot.tsx
│ │ │ ├── AppWrapper.tsx
│ │ │ ├── buildProxy.ts
│ │ │ ├── collectFnVarDeps.ts
│ │ │ ├── ComponentAdapter.tsx
│ │ │ ├── ComponentWrapper.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── containers.ts
│ │ │ ├── ContainerWrapper.tsx
│ │ │ ├── ErrorBoundary.module.scss
│ │ │ ├── ErrorBoundary.tsx
│ │ │ ├── InvalidComponent.module.scss
│ │ │ ├── InvalidComponent.tsx
│ │ │ ├── nodeUtils.ts
│ │ │ ├── reducer.ts
│ │ │ ├── renderChild.tsx
│ │ │ ├── StandaloneComponent.tsx
│ │ │ ├── StateContainer.tsx
│ │ │ ├── UnknownComponent.module.scss
│ │ │ ├── UnknownComponent.tsx
│ │ │ └── valueExtractor.ts
│ │ ├── reportEngineError.ts
│ │ ├── RestApiProxy.ts
│ │ ├── script-runner
│ │ │ ├── asyncProxy.ts
│ │ │ ├── AttributeValueParser.ts
│ │ │ ├── bannedFunctions.ts
│ │ │ ├── BindingTreeEvaluationContext.ts
│ │ │ ├── eval-tree-async.ts
│ │ │ ├── eval-tree-common.ts
│ │ │ ├── eval-tree-sync.ts
│ │ │ ├── ParameterParser.ts
│ │ │ ├── process-statement-async.ts
│ │ │ ├── process-statement-common.ts
│ │ │ ├── process-statement-sync.ts
│ │ │ ├── ScriptingSourceTree.ts
│ │ │ ├── simplify-expression.ts
│ │ │ ├── statement-queue.ts
│ │ │ └── visitors.ts
│ │ ├── StandaloneApp.tsx
│ │ ├── StandaloneExtensionManager.ts
│ │ ├── TableOfContentsContext.tsx
│ │ ├── theming
│ │ │ ├── _themes.scss
│ │ │ ├── component-layout-resolver.ts
│ │ │ ├── extendThemeUtils.ts
│ │ │ ├── hvar.ts
│ │ │ ├── layout-resolver.ts
│ │ │ ├── parse-layout-props.ts
│ │ │ ├── StyleContext.tsx
│ │ │ ├── StyleRegistry.ts
│ │ │ ├── ThemeContext.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── themes
│ │ │ │ ├── base-utils.ts
│ │ │ │ ├── palette.ts
│ │ │ │ ├── root.ts
│ │ │ │ ├── solid.ts
│ │ │ │ ├── theme-colors.ts
│ │ │ │ └── xmlui.ts
│ │ │ ├── themeVars.module.scss
│ │ │ ├── themeVars.ts
│ │ │ ├── transformThemeVars.ts
│ │ │ └── utils.ts
│ │ ├── utils
│ │ │ ├── actionUtils.ts
│ │ │ ├── audio-utils.ts
│ │ │ ├── base64-utils.ts
│ │ │ ├── compound-utils.ts
│ │ │ ├── css-utils.ts
│ │ │ ├── DataLoaderQueryKeyGenerator.ts
│ │ │ ├── date-utils.ts
│ │ │ ├── extractParam.ts
│ │ │ ├── hooks.tsx
│ │ │ ├── LruCache.ts
│ │ │ ├── mergeProps.ts
│ │ │ ├── misc.ts
│ │ │ ├── request-params.ts
│ │ │ ├── statementUtils.ts
│ │ │ └── treeUtils.ts
│ │ └── xmlui-parser.ts
│ ├── index-standalone.ts
│ ├── index.scss
│ ├── index.ts
│ ├── language-server
│ │ ├── server-common.ts
│ │ ├── server-web-worker.ts
│ │ ├── server.ts
│ │ ├── services
│ │ │ ├── common
│ │ │ │ ├── docs-generation.ts
│ │ │ │ ├── lsp-utils.ts
│ │ │ │ ├── metadata-utils.ts
│ │ │ │ └── syntax-node-utilities.ts
│ │ │ ├── completion.ts
│ │ │ ├── diagnostic.ts
│ │ │ ├── format.ts
│ │ │ └── hover.ts
│ │ └── xmlui-metadata-generated.mjs
│ ├── logging
│ │ ├── LoggerContext.tsx
│ │ ├── LoggerInitializer.tsx
│ │ ├── LoggerService.ts
│ │ └── xmlui.ts
│ ├── logo.svg
│ ├── parsers
│ │ ├── common
│ │ │ ├── GenericToken.ts
│ │ │ ├── InputStream.ts
│ │ │ └── utils.ts
│ │ ├── scripting
│ │ │ ├── code-behind-collect.ts
│ │ │ ├── Lexer.ts
│ │ │ ├── modules.ts
│ │ │ ├── Parser.ts
│ │ │ ├── ParserError.ts
│ │ │ ├── ScriptingNodeTypes.ts
│ │ │ ├── TokenTrait.ts
│ │ │ ├── TokenType.ts
│ │ │ └── tree-visitor.ts
│ │ ├── style-parser
│ │ │ ├── errors.ts
│ │ │ ├── source-tree.ts
│ │ │ ├── StyleInputStream.ts
│ │ │ ├── StyleLexer.ts
│ │ │ ├── StyleParser.ts
│ │ │ └── tokens.ts
│ │ └── xmlui-parser
│ │ ├── CharacterCodes.ts
│ │ ├── diagnostics.ts
│ │ ├── fileExtensions.ts
│ │ ├── index.ts
│ │ ├── lint.ts
│ │ ├── parser.ts
│ │ ├── ParserError.ts
│ │ ├── scanner.ts
│ │ ├── syntax-kind.ts
│ │ ├── syntax-node.ts
│ │ ├── transform.ts
│ │ ├── utils.ts
│ │ ├── xmlui-serializer.ts
│ │ └── xmlui-tree.ts
│ ├── react-app-env.d.ts
│ ├── syntax
│ │ ├── monaco
│ │ │ ├── grammar.monacoLanguage.ts
│ │ │ ├── index.ts
│ │ │ ├── xmlui-dark.ts
│ │ │ ├── xmlui-light.ts
│ │ │ └── xmluiscript.monacoLanguage.ts
│ │ └── textMate
│ │ ├── index.ts
│ │ ├── xmlui-dark.json
│ │ ├── xmlui-light.json
│ │ ├── xmlui.json
│ │ └── xmlui.tmLanguage.json
│ ├── testing
│ │ ├── assertions.ts
│ │ ├── component-test-helpers.ts
│ │ ├── ComponentDrivers.ts
│ │ ├── drivers
│ │ │ ├── DateInputDriver.ts
│ │ │ ├── ModalDialogDriver.ts
│ │ │ ├── NumberBoxDriver.ts
│ │ │ ├── TextBoxDriver.ts
│ │ │ ├── TimeInputDriver.ts
│ │ │ ├── TimerDriver.ts
│ │ │ └── TreeDriver.ts
│ │ ├── fixtures.ts
│ │ ├── infrastructure
│ │ │ ├── index.html
│ │ │ ├── main.tsx
│ │ │ ├── public
│ │ │ │ ├── mockServiceWorker.js
│ │ │ │ ├── resources
│ │ │ │ │ ├── bell.svg
│ │ │ │ │ ├── box.svg
│ │ │ │ │ ├── doc.svg
│ │ │ │ │ ├── eye.svg
│ │ │ │ │ ├── flower-640x480.jpg
│ │ │ │ │ ├── sun.svg
│ │ │ │ │ ├── test-image-100x100.jpg
│ │ │ │ │ └── txt.svg
│ │ │ │ └── serve.json
│ │ │ └── TestBed.tsx
│ │ └── themed-app-test-helpers.ts
│ └── vite-env.d.ts
├── tests
│ ├── components
│ │ ├── CodeBlock
│ │ │ └── hightlight-code.test.ts
│ │ ├── playground-pattern.test.ts
│ │ └── Tree
│ │ └── Tree-states.test.ts
│ ├── components-core
│ │ ├── abstractions
│ │ │ └── treeAbstractions.test.ts
│ │ ├── container
│ │ │ └── buildProxy.test.ts
│ │ ├── interception
│ │ │ ├── orderBy.test.ts
│ │ │ ├── ReadOnlyCollection.test.ts
│ │ │ └── request-param-converter.test.ts
│ │ ├── scripts-runner
│ │ │ ├── AttributeValueParser.test.ts
│ │ │ ├── eval-tree-arrow-async.test.ts
│ │ │ ├── eval-tree-arrow.test.ts
│ │ │ ├── eval-tree-func-decl-async.test.ts
│ │ │ ├── eval-tree-func-decl.test.ts
│ │ │ ├── eval-tree-pre-post.test.ts
│ │ │ ├── eval-tree-regression.test.ts
│ │ │ ├── eval-tree.test.ts
│ │ │ ├── function-proxy.test.ts
│ │ │ ├── parser-regression.test.ts
│ │ │ ├── process-event.test.ts
│ │ │ ├── process-function.test.ts
│ │ │ ├── process-implicit-context.test.ts
│ │ │ ├── process-statement-asgn.test.ts
│ │ │ ├── process-statement-destruct.test.ts
│ │ │ ├── process-statement-regs.test.ts
│ │ │ ├── process-statement-sync.test.ts
│ │ │ ├── process-statement.test.ts
│ │ │ ├── process-switch-sync.test.ts
│ │ │ ├── process-switch.test.ts
│ │ │ ├── process-try-sync.test.ts
│ │ │ ├── process-try.test.ts
│ │ │ └── test-helpers.ts
│ │ ├── test-metadata-handler.ts
│ │ ├── theming
│ │ │ ├── border-segments.test.ts
│ │ │ ├── component-layout.resolver.test.ts
│ │ │ ├── layout-property-parser.test.ts
│ │ │ ├── layout-resolver.test.ts
│ │ │ ├── layout-resolver2.test.ts
│ │ │ ├── layout-vp-override.test.ts
│ │ │ └── padding-segments.test.ts
│ │ └── utils
│ │ ├── date-utils.test.ts
│ │ ├── format-human-elapsed-time.test.ts
│ │ └── LruCache.test.ts
│ ├── language-server
│ │ ├── completion.test.ts
│ │ ├── format.test.ts
│ │ ├── hover.test.ts
│ │ └── mockData.ts
│ └── parsers
│ ├── common
│ │ └── input-stream.test.ts
│ ├── markdown
│ │ └── parse-binding-expression.test.ts
│ ├── parameter-parser.test.ts
│ ├── paremeter-parser.test.ts
│ ├── scripting
│ │ ├── eval-tree-arrow.test.ts
│ │ ├── eval-tree-pre-post.test.ts
│ │ ├── eval-tree.test.ts
│ │ ├── function-proxy.test.ts
│ │ ├── lexer-literals.test.ts
│ │ ├── lexer-misc.test.ts
│ │ ├── module-parse.test.ts
│ │ ├── parser-arrow.test.ts
│ │ ├── parser-assignments.test.ts
│ │ ├── parser-binary.test.ts
│ │ ├── parser-destructuring.test.ts
│ │ ├── parser-errors.test.ts
│ │ ├── parser-expressions.test.ts
│ │ ├── parser-function.test.ts
│ │ ├── parser-literals.test.ts
│ │ ├── parser-primary.test.ts
│ │ ├── parser-regex.test.ts
│ │ ├── parser-statements.test.ts
│ │ ├── parser-unary.test.ts
│ │ ├── process-event.test.ts
│ │ ├── process-implicit-context.test.ts
│ │ ├── process-statement-asgn.test.ts
│ │ ├── process-statement-destruct.test.ts
│ │ ├── process-statement-regs.test.ts
│ │ ├── process-statement-sync.test.ts
│ │ ├── process-statement.test.ts
│ │ ├── process-switch-sync.test.ts
│ │ ├── process-switch.test.ts
│ │ ├── process-try-sync.test.ts
│ │ ├── process-try.test.ts
│ │ ├── simplify-expression.test.ts
│ │ ├── statement-hooks.test.ts
│ │ └── test-helpers.ts
│ ├── style-parser
│ │ ├── generateHvarChain.test.ts
│ │ ├── parseHVar.test.ts
│ │ ├── parser.test.ts
│ │ └── tokens.test.ts
│ └── xmlui
│ ├── lint.test.ts
│ ├── parser.test.ts
│ ├── scanner.test.ts
│ ├── transform.attr.test.ts
│ ├── transform.circular.test.ts
│ ├── transform.element.test.ts
│ ├── transform.errors.test.ts
│ ├── transform.escape.test.ts
│ ├── transform.regression.test.ts
│ ├── transform.script.test.ts
│ ├── transform.test.ts
│ └── xmlui.ts
├── tests-e2e
│ ├── api-bound-component-regression.spec.ts
│ ├── api-call-as-extracted-component.spec.ts
│ ├── assign-to-object-or-array-regression.spec.ts
│ ├── binding-regression.spec.ts
│ ├── children-as-template-context-vars.spec.ts
│ ├── compound-component.spec.ts
│ ├── context-vars-regression.spec.ts
│ ├── data-bindings.spec.ts
│ ├── datasource-and-api-usage-in-var.spec.ts
│ ├── datasource-direct-binding.spec.ts
│ ├── datasource-onLoaded-regression.spec.ts
│ ├── modify-array-item-regression.spec.ts
│ ├── namespaces.spec.ts
│ ├── push-to-array-regression.spec.ts
│ ├── screen-breakpoints.spec.ts
│ ├── scripting.spec.ts
│ ├── state-scope-in-pages.spec.ts
│ └── state-var-scopes.spec.ts
├── tsconfig.bin.json
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.ts
└── vitest.config.ts
```
# Files
--------------------------------------------------------------------------------
/xmlui/src/components/Form/Form.spec.ts:
--------------------------------------------------------------------------------
```typescript
1 | import type { ApiInterceptorDefinition } from "../../components-core/interception/abstractions";
2 | import { labelPositionValues } from "../abstractions";
3 | import { expect, test } from "../../testing/fixtures";
4 | import { getElementStyle } from "../../testing/component-test-helpers";
5 |
6 | // Test data constants
7 | const errorDisplayInterceptor: ApiInterceptorDefinition = {
8 | initialize: `
9 | $state.items = {
10 | [10]: { name: "Smith", id: 10 }
11 | };
12 | $state.currentId = 10;
13 | `,
14 | operations: {
15 | "no-validation-error": {
16 | url: "/no-validation-error",
17 | method: "post",
18 | handler: `return true;`,
19 | },
20 | "general-validation-error": {
21 | url: "/general-validation-error",
22 | method: "post",
23 | handler: `
24 | throw Errors.HttpError(404,
25 | {
26 | message: "General error message from the backend",
27 | issues: [
28 | { message: "Error for the whole form", severity: "error" },
29 | { message: "Warning for the whole form", severity: "warning" },
30 | ]
31 | }
32 | );
33 | `,
34 | },
35 | "field-validation-error": {
36 | url: "/field-validation-error",
37 | method: "post",
38 | handler: `
39 | throw Errors.HttpError(404,
40 | {
41 | message: "Field error message from the backend",
42 | issues: [
43 | { field: "test", message: "Display warning", severity: "warning" },
44 | ]
45 | }
46 | );
47 | `,
48 | },
49 | },
50 | };
51 |
52 | // =============================================================================
53 | // BASIC FUNCTIONALITY TESTS
54 | // =============================================================================
55 |
56 | test.describe("Basic Functionality", () => {
57 | test("component renders with default props", async ({ initTestBed, createFormDriver }) => {
58 | await initTestBed(`<Form testId="form"/>`);
59 | const driver = await createFormDriver("form");
60 | await expect(driver.component).toBeVisible();
61 | });
62 |
63 | test("component renders with form items", async ({ initTestBed, page }) => {
64 | await initTestBed(`
65 | <Form>
66 | <FormItem label="Name" bindTo="name" />
67 | <FormItem label="Email" bindTo="email" />
68 | </Form>
69 | `);
70 |
71 | await expect(page.getByText("Name")).toBeVisible();
72 | await expect(page.getByText("Email")).toBeVisible();
73 | });
74 |
75 | test("component renders save and cancel buttons by default", async ({ initTestBed, page }) => {
76 | await initTestBed(`<Form/>`);
77 |
78 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
79 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
80 | });
81 |
82 | test("component renders custom button labels", async ({ initTestBed, page }) => {
83 | await initTestBed(`
84 | <Form cancelLabel="Go Back" saveLabel="Submit"/>
85 | `);
86 |
87 | await expect(page.getByRole("button", { name: "Go Back" })).toBeVisible();
88 | await expect(page.getByRole("button", { name: "Submit" })).toBeVisible();
89 | });
90 |
91 | test("component swaps cancel and save button positions", async ({ initTestBed, page }) => {
92 | await initTestBed(`
93 | <Form swapCancelAndSave="true"/>
94 | `);
95 |
96 | const buttons = page.getByRole("button");
97 | await expect(buttons.first()).toHaveText("Save");
98 | await expect(buttons.last()).toHaveText("Cancel");
99 | });
100 |
101 | // =============================================================================
102 | // HIDE BUTTON ROW TESTS
103 | // =============================================================================
104 |
105 | test.describe("hideButtonRow property", () => {
106 | test("hides button row when set to true", async ({ initTestBed, page }) => {
107 | await initTestBed(`<Form hideButtonRow="true"/>`);
108 |
109 | await expect(page.getByRole("button", { name: "Cancel" })).not.toBeVisible();
110 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
111 | });
112 |
113 | test("shows button row when set to false", async ({ initTestBed, page }) => {
114 | await initTestBed(`<Form hideButtonRow="false"/>`);
115 |
116 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
117 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
118 | });
119 |
120 | test("shows button row by default when property not set", async ({ initTestBed, page }) => {
121 | await initTestBed(`<Form/>`);
122 |
123 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
124 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
125 | });
126 |
127 | test("hides custom button row template when set to true", async ({ initTestBed, page }) => {
128 | await initTestBed(`
129 | <Form hideButtonRow="true">
130 | <property name="buttonRowTemplate">
131 | <Button label="Custom Save" type="submit" testId="customSave" />
132 | <Button label="Custom Cancel" type="button" testId="customCancel" />
133 | </property>
134 | </Form>
135 | `);
136 |
137 | await expect(page.getByTestId("customSave")).not.toBeVisible();
138 | await expect(page.getByTestId("customCancel")).not.toBeVisible();
139 | });
140 |
141 | test("overrides hideButtonRowUntilDirty when both are set", async ({
142 | initTestBed,
143 | page,
144 | createFormItemDriver,
145 | createTextBoxDriver,
146 | }) => {
147 | await initTestBed(`
148 | <Form hideButtonRow="true" hideButtonRowUntilDirty="true">
149 | <FormItem label="Name" bindTo="name" testId="nameField" />
150 | </Form>
151 | `);
152 |
153 | // Button row should be hidden even before making changes
154 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
155 | await expect(page.getByRole("button", { name: "Cancel" })).not.toBeVisible();
156 |
157 | // Make the form dirty
158 | const driver = await createFormItemDriver("nameField");
159 | const input = await createTextBoxDriver(driver.input);
160 | await input.field.fill("John");
161 |
162 | // Button row should still be hidden even after making changes
163 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
164 | await expect(page.getByRole("button", { name: "Cancel" })).not.toBeVisible();
165 | });
166 |
167 | test("handles null value gracefully", async ({ initTestBed, page }) => {
168 | await initTestBed(`<Form hideButtonRow="{null}"/>`);
169 |
170 | // Should show button row (default behavior)
171 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
172 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
173 | });
174 |
175 | test("handles undefined value gracefully", async ({ initTestBed, page }) => {
176 | await initTestBed(`<Form hideButtonRow="{undefined}"/>`);
177 |
178 | // Should show button row (default behavior)
179 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
180 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
181 | });
182 |
183 | test("handles string 'true' value", async ({ initTestBed, page }) => {
184 | await initTestBed(`<Form hideButtonRow="true"/>`);
185 |
186 | await expect(page.getByRole("button", { name: "Cancel" })).not.toBeVisible();
187 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
188 | });
189 |
190 | test("handles string 'false' value", async ({ initTestBed, page }) => {
191 | await initTestBed(`<Form hideButtonRow="false"/>`);
192 |
193 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
194 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
195 | });
196 |
197 | test("form submission still works with hidden button row via external submit", async ({
198 | initTestBed,
199 | page,
200 | createFormItemDriver,
201 | createTextBoxDriver,
202 | }) => {
203 | const { testStateDriver } = await initTestBed(`
204 | <Fragment>
205 | <Form id="testForm" hideButtonRow="true" onSubmit="arg => testState = arg">
206 | <FormItem label="Name" bindTo="name" testId="nameField" />
207 | <Button type="submit" label="External Submit" testId="externalSubmit" />
208 | </Form>
209 | </Fragment>
210 | `);
211 |
212 | const driver = await createFormItemDriver("nameField");
213 | const input = await createTextBoxDriver(driver.input);
214 | await input.field.fill("John Doe");
215 |
216 | await page.getByTestId("externalSubmit").click();
217 |
218 | const submittedData = await testStateDriver.testState();
219 | expect(submittedData).toEqual({ name: "John Doe" });
220 | });
221 | });
222 |
223 | // =============================================================================
224 | // HIDE BUTTON ROW UNTIL DIRTY TESTS
225 | // =============================================================================
226 |
227 | test.describe("hideButtonRowUntilDirty property", () => {
228 | test("hides button row initially when form is not dirty", async ({
229 | initTestBed,
230 | page,
231 | }) => {
232 | await initTestBed(`
233 | <Form hideButtonRowUntilDirty="true">
234 | <FormItem label="Name" bindTo="name" testId="nameField" />
235 | </Form>
236 | `);
237 |
238 | await expect(page.getByRole("button", { name: "Cancel" })).not.toBeVisible();
239 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
240 | });
241 |
242 | test("shows button row when form becomes dirty", async ({
243 | initTestBed,
244 | page,
245 | createFormItemDriver,
246 | createTextBoxDriver,
247 | }) => {
248 | await initTestBed(`
249 | <Form hideButtonRowUntilDirty="true">
250 | <FormItem label="Name" bindTo="name" testId="nameField" />
251 | </Form>
252 | `);
253 |
254 | // Initially hidden
255 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
256 |
257 | // Make form dirty
258 | const driver = await createFormItemDriver("nameField");
259 | const input = await createTextBoxDriver(driver.input);
260 | await input.field.fill("John");
261 |
262 | // Now visible
263 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
264 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
265 | });
266 |
267 | test("keeps button row visible after form becomes dirty", async ({
268 | initTestBed,
269 | page,
270 | createFormItemDriver,
271 | createTextBoxDriver,
272 | }) => {
273 | await initTestBed(`
274 | <Form hideButtonRowUntilDirty="true">
275 | <FormItem label="Name" bindTo="name" testId="nameField" />
276 | </Form>
277 | `);
278 |
279 | const driver = await createFormItemDriver("nameField");
280 | const input = await createTextBoxDriver(driver.input);
281 |
282 | // Make form dirty
283 | await input.field.fill("John");
284 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
285 |
286 | // Clear the input (form is still dirty)
287 | await input.field.clear();
288 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
289 | });
290 |
291 | test("shows button row by default when property set to false", async ({
292 | initTestBed,
293 | page,
294 | }) => {
295 | await initTestBed(`
296 | <Form hideButtonRowUntilDirty="false">
297 | <FormItem label="Name" bindTo="name" testId="nameField" />
298 | </Form>
299 | `);
300 |
301 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
302 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
303 | });
304 |
305 | test("shows button row by default when property not set", async ({
306 | initTestBed,
307 | page,
308 | }) => {
309 | await initTestBed(`
310 | <Form>
311 | <FormItem label="Name" bindTo="name" testId="nameField" />
312 | </Form>
313 | `);
314 |
315 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
316 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
317 | });
318 |
319 | test("works with multiple form items", async ({
320 | initTestBed,
321 | page,
322 | createFormItemDriver,
323 | createTextBoxDriver,
324 | }) => {
325 | await initTestBed(`
326 | <Form hideButtonRowUntilDirty="true">
327 | <FormItem label="Name" bindTo="name" testId="nameField" />
328 | <FormItem label="Email" bindTo="email" testId="emailField" />
329 | </Form>
330 | `);
331 |
332 | // Initially hidden
333 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
334 |
335 | // Modify second field
336 | const emailDriver = await createFormItemDriver("emailField");
337 | const emailInput = await createTextBoxDriver(emailDriver.input);
338 | await emailInput.field.fill("[email protected]");
339 |
340 | // Now visible
341 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
342 | });
343 |
344 | test("hides custom button row template until dirty", async ({
345 | initTestBed,
346 | page,
347 | createFormItemDriver,
348 | createTextBoxDriver,
349 | }) => {
350 | await initTestBed(`
351 | <Form hideButtonRowUntilDirty="true">
352 | <FormItem label="Name" bindTo="name" testId="nameField" />
353 | <property name="buttonRowTemplate">
354 | <Button label="Custom Save" type="submit" testId="customSave" />
355 | </property>
356 | </Form>
357 | `);
358 |
359 | // Initially hidden
360 | await expect(page.getByTestId("customSave")).not.toBeVisible();
361 |
362 | // Make form dirty
363 | const driver = await createFormItemDriver("nameField");
364 | const input = await createTextBoxDriver(driver.input);
365 | await input.field.fill("John");
366 |
367 | // Now visible
368 | await expect(page.getByTestId("customSave")).toBeVisible();
369 | });
370 |
371 | test("handles null value gracefully", async ({ initTestBed, page }) => {
372 | await initTestBed(`
373 | <Form hideButtonRowUntilDirty="{null}">
374 | <FormItem label="Name" bindTo="name" testId="nameField" />
375 | </Form>
376 | `);
377 |
378 | // Should show button row (default behavior)
379 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
380 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
381 | });
382 |
383 | test("handles undefined value gracefully", async ({ initTestBed, page }) => {
384 | await initTestBed(`
385 | <Form hideButtonRowUntilDirty="{undefined}">
386 | <FormItem label="Name" bindTo="name" testId="nameField" />
387 | </Form>
388 | `);
389 |
390 | // Should show button row (default behavior)
391 | await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
392 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
393 | });
394 |
395 | test("works with form initialized with data", async ({
396 | initTestBed,
397 | page,
398 | createFormItemDriver,
399 | createTextBoxDriver,
400 | }) => {
401 | await initTestBed(`
402 | <Form hideButtonRowUntilDirty="true" data="{{ name: 'Initial' }}">
403 | <FormItem label="Name" bindTo="name" testId="nameField" />
404 | </Form>
405 | `);
406 |
407 | // Initially hidden (form has data but is not dirty)
408 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
409 |
410 | // Make form dirty
411 | const driver = await createFormItemDriver("nameField");
412 | const input = await createTextBoxDriver(driver.input);
413 | await input.field.fill("Modified");
414 |
415 | // Now visible
416 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
417 | });
418 |
419 | test("button row appears when checkbox is checked", async ({
420 | initTestBed,
421 | page,
422 | }) => {
423 | await initTestBed(`
424 | <Form hideButtonRowUntilDirty="true">
425 | <FormItem label="Accept Terms" bindTo="terms" type="checkbox" />
426 | </Form>
427 | `);
428 |
429 | // Initially hidden
430 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
431 |
432 | // Check the checkbox
433 | const checkbox = page.getByRole("checkbox");
434 | await checkbox.check();
435 |
436 | // Now visible
437 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
438 | });
439 |
440 | test("button row appears when slider value changes", async ({
441 | initTestBed,
442 | page,
443 | }) => {
444 | await initTestBed(`
445 | <Form hideButtonRowUntilDirty="true">
446 | <FormItem label="Volume" bindTo="volume" type="slider" testId="volumeField" />
447 | </Form>
448 | `);
449 |
450 | // Initially hidden
451 | await expect(page.getByRole("button", { name: "Save" })).not.toBeVisible();
452 |
453 | // Move the slider using keyboard
454 | const slider = page.getByRole("slider");
455 | await slider.press("ArrowRight");
456 |
457 | // Now visible
458 | await expect(page.getByRole("button", { name: "Save" })).toBeVisible();
459 | });
460 | });
461 |
462 | // =============================================================================
463 | // DATA PROPERTY TESTS
464 | // =============================================================================
465 |
466 | test.describe("data property", () => {
467 | test("sets initial form data", async ({
468 | initTestBed,
469 | createFormItemDriver,
470 | createTextBoxDriver,
471 | }) => {
472 | await initTestBed(`
473 | <Form data="{{ name: 'John', age: 30 }}">
474 | <FormItem label="Name" bindTo="name" testId="nameField" />
475 | <FormItem label="Age" bindTo="age" type="integer" testId="ageField" />
476 | </Form>
477 | `);
478 |
479 | const nameDriver = await createFormItemDriver("nameField");
480 | const nameInput = await createTextBoxDriver(nameDriver.input);
481 | const ageDriver = await createFormItemDriver("ageField");
482 | const ageInput = await createTextBoxDriver(ageDriver.input);
483 |
484 | await expect(nameInput.field).toHaveValue("John");
485 | await expect(ageInput.field).toHaveValue("30");
486 | });
487 |
488 | test("handles null data gracefully", async ({ initTestBed, createFormDriver }) => {
489 | await initTestBed(`<Form data="{null}" testId="form"/>`);
490 | const driver = await createFormDriver("form");
491 | await expect(driver.component).toBeVisible();
492 | });
493 |
494 | test("handles undefined data gracefully", async ({ initTestBed, createFormDriver }) => {
495 | await initTestBed(`<Form data="{undefined}" testId="form"/>`);
496 | const driver = await createFormDriver("form");
497 | await expect(driver.component).toBeVisible();
498 | });
499 |
500 | test("handles empty object data", async ({ initTestBed, createFormDriver }) => {
501 | await initTestBed(`<Form data="{{}}" testId="form"/>`);
502 | const driver = await createFormDriver("form");
503 | await expect(driver.component).toBeVisible();
504 | });
505 | });
506 |
507 | // =============================================================================
508 | // ITEM LABEL POSITION TESTS
509 | // =============================================================================
510 |
511 | test.describe("itemLabelPosition property", () => {
512 | labelPositionValues.forEach((position) => {
513 | test(`sets item label position to ${position}`, async ({
514 | initTestBed,
515 | createFormItemDriver,
516 | }) => {
517 | await initTestBed(`
518 | <Form itemLabelPosition="${position}">
519 | <FormItem label="Test Label" bindTo="test" testId="testField" />
520 | </Form>
521 | `);
522 |
523 | const driver = await createFormItemDriver("testField");
524 | await expect(driver.label).toBeVisible();
525 | });
526 | });
527 |
528 | test("handles invalid itemLabelPosition gracefully", async ({
529 | initTestBed,
530 | createFormDriver,
531 | }) => {
532 | await initTestBed(`<Form itemLabelPosition="invalid" testId="form"/>`);
533 | const driver = await createFormDriver("form");
534 | await expect(driver.component).toBeVisible();
535 | });
536 | });
537 |
538 | // =============================================================================
539 | // ITEM LABEL WIDTH TESTS
540 | // =============================================================================
541 |
542 | test.describe("itemLabelWidth property", () => {
543 | test("sets custom label width", async ({ initTestBed, createFormItemDriver }) => {
544 | await initTestBed(`
545 | <Form itemLabelWidth="200px">
546 | <FormItem label="Test Label" bindTo="test" testId="testField" />
547 | </Form>
548 | `);
549 |
550 | const driver = await createFormItemDriver("testField");
551 | await expect(driver.label).toBeVisible();
552 | });
553 |
554 | test("handles numeric label width", async ({ initTestBed, createFormItemDriver }) => {
555 | await initTestBed(`
556 | <Form itemLabelWidth="150">
557 | <FormItem label="Test Label" bindTo="test" testId="testField" />
558 | </Form>
559 | `);
560 |
561 | const driver = await createFormItemDriver("testField");
562 | await expect(driver.label).toBeVisible();
563 | });
564 |
565 | test("handles invalid label width gracefully", async ({ initTestBed, createFormDriver }) => {
566 | await initTestBed(`<Form itemLabelWidth="invalid" testId="form"/>`);
567 | const driver = await createFormDriver("form");
568 | await expect(driver.component).toBeVisible();
569 | });
570 |
571 | test("handles theme variable", async ({ initTestBed, createFormItemDriver }) => {
572 | const spaceBase = 0.25; //rem
573 | const labelSize = 10;
574 | const widthInPx = labelSize * spaceBase * 16; //px
575 | await initTestBed(`
576 | <Theme space-base="${spaceBase}rem">
577 | <Form itemLabelWidth="$space-${labelSize}">
578 | <FormItem label="Test Label" bindTo="test" testId="testField" />
579 | </Form>
580 | </Theme>
581 | `);
582 | const driver = await createFormItemDriver("testField");
583 | const labelWidth = await getElementStyle(driver.label, "width");
584 | expect(labelWidth).toBe(`${widthInPx}px`);
585 | });
586 | });
587 |
588 | // =============================================================================
589 | // ITEM LABEL BREAK TESTS
590 | // =============================================================================
591 |
592 | test.describe("itemLabelBreak property", () => {
593 | test("enables label line breaking", async ({ initTestBed, createFormItemDriver }) => {
594 | await initTestBed(`
595 | <Form itemLabelBreak="true">
596 | <FormItem label="Very Long Label That Should Break" bindTo="test" testId="testField" />
597 | </Form>
598 | `);
599 |
600 | const driver = await createFormItemDriver("testField");
601 | await expect(driver.label).toBeVisible();
602 | });
603 |
604 | test("disables label line breaking", async ({ initTestBed, createFormItemDriver }) => {
605 | await initTestBed(`
606 | <Form itemLabelBreak="false">
607 | <FormItem label="Very Long Label That Should Not Break" bindTo="test" testId="testField" />
608 | </Form>
609 | `);
610 |
611 | const driver = await createFormItemDriver("testField");
612 | await expect(driver.label).toBeVisible();
613 | });
614 | });
615 |
616 | // =============================================================================
617 | // ENABLED PROPERTY TESTS
618 | // =============================================================================
619 |
620 | test.describe("enabled property", () => {
621 | test("disables save button when enabled is false", async ({ initTestBed, page }) => {
622 | await initTestBed(`
623 | <Form enabled="false">
624 | <FormItem label="Test" bindTo="test" />
625 | </Form>
626 | `);
627 |
628 | const saveButton = page.getByRole("button", { name: "Save" });
629 | await expect(saveButton).toBeDisabled();
630 | });
631 |
632 | test("enables form when enabled is true", async ({ initTestBed, page }) => {
633 | await initTestBed(`
634 | <Form enabled="true">
635 | <FormItem label="Test" bindTo="test" />
636 | </Form>
637 | `);
638 |
639 | const saveButton = page.getByRole("button", { name: "Save" });
640 | const cancelButton = page.getByRole("button", { name: "Cancel" });
641 |
642 | await expect(saveButton).toBeEnabled();
643 | await expect(cancelButton).toBeEnabled();
644 | });
645 | });
646 |
647 | // =============================================================================
648 | // BUTTON ROW TEMPLATE TESTS
649 | // =============================================================================
650 |
651 | test.describe("buttonRowTemplate property", () => {
652 | test("supports custom button row template", async ({ initTestBed, page }) => {
653 | await initTestBed(`
654 | <Form>
655 | <FormItem label="Test" bindTo="test" />
656 | <property name="buttonRowTemplate">
657 | <Button label="Custom Save" type="submit" />
658 | <Button label="Custom Cancel" type="button" />
659 | </property>
660 | </Form>
661 | `);
662 |
663 | await expect(page.getByRole("button", { name: "Custom Save" })).toBeVisible();
664 | await expect(page.getByRole("button", { name: "Custom Cancel" })).toBeVisible();
665 | });
666 | });
667 |
668 | // =============================================================================
669 | // EVENT TESTS
670 | // =============================================================================
671 |
672 | test.describe("Events", () => {
673 | test("onSubmit event fires with form data", async ({ initTestBed, page }) => {
674 | const { testStateDriver } = await initTestBed(`
675 | <Form data="{{ name: 'John', email: '[email protected]' }}" onSubmit="data => testState = data">
676 | <FormItem label="Name" bindTo="name" />
677 | <FormItem label="Email" bindTo="email" />
678 | </Form>
679 | `);
680 |
681 | await page.getByRole("button", { name: "Save" }).click();
682 |
683 | await expect.poll(testStateDriver.testState).toEqual({
684 | name: "John",
685 | email: "[email protected]",
686 | });
687 | });
688 |
689 | test("onCancel event fires when cancel button clicked", async ({ initTestBed, page }) => {
690 | const { testStateDriver } = await initTestBed(`
691 | <Form onCancel="testState = 'cancelled'">
692 | <FormItem label="Test" bindTo="test" />
693 | </Form>
694 | `);
695 |
696 | await page.getByRole("button", { name: "Cancel" }).click();
697 |
698 | await expect.poll(testStateDriver.testState).toEqual("cancelled");
699 | });
700 |
701 | test("onSuccess event fires on successful submission", async ({
702 | initTestBed,
703 | page,
704 | createFormDriver,
705 | }) => {
706 | const { testStateDriver } = await initTestBed(
707 | `
708 | <Form
709 | testId="form"
710 | submitUrl="/test-success"
711 | onSuccess="testState = 'success'; console.log('Submitted successfully')"
712 | data="{{ name: 'Test' }}">
713 | <FormItem label="Name" bindTo="name" />
714 | </Form>
715 | `,
716 | {
717 | apiInterceptor: {
718 | operations: {
719 | testSuccess: {
720 | url: "/test-success",
721 | method: "put",
722 | handler: `return { success: true };`,
723 | },
724 | },
725 | },
726 | },
727 | );
728 |
729 | const driver = await createFormDriver("form");
730 | await driver.submitForm();
731 | await expect.poll(testStateDriver.testState).toEqual("success");
732 | });
733 |
734 | test("onReset event fires when form is reset", async ({ initTestBed, page }) => {
735 | const { testStateDriver } = await initTestBed(`
736 | <Form
737 | id="testForm"
738 | onReset="testState = 'reset'"
739 | data="{{ name: 'Test' }}">
740 | <FormItem label="Name" bindTo="name" />
741 | <Button onClick="testForm.reset()" label="Reset Form" />
742 | </Form>
743 | `);
744 |
745 | await page.getByRole("button", { name: "Reset Form" }).click();
746 |
747 | await expect.poll(testStateDriver.testState).toEqual("reset");
748 | });
749 | });
750 |
751 | // =============================================================================
752 | // API TESTS
753 | // =============================================================================
754 |
755 | test.describe("APIs", () => {
756 | test("update method updates form data", async ({
757 | initTestBed,
758 | page,
759 | createFormItemDriver,
760 | createTextBoxDriver,
761 | }) => {
762 | await initTestBed(`
763 | <Form
764 | id="testForm"
765 | data="{{ name: 'Original', age: 25 }}">
766 | <FormItem label="Name" bindTo="name" testId="nameField" />
767 | <FormItem label="Age" bindTo="age" type="integer" testId="ageField" />
768 | <Button onClick="testForm.update({ name: 'Updated', age: 30 })" label="Update" />
769 | </Form>
770 | `);
771 |
772 | const nameDriver = await createFormItemDriver("nameField");
773 | const nameInput = await createTextBoxDriver(nameDriver.input);
774 | const ageDriver = await createFormItemDriver("ageField");
775 | const ageInput = await createTextBoxDriver(ageDriver.input);
776 |
777 | await expect(nameInput.field).toHaveValue("Original");
778 | await expect(ageInput.field).toHaveValue("25");
779 |
780 | await page.getByRole("button", { name: "Update" }).click();
781 |
782 | await expect(nameInput.field).toHaveValue("Updated");
783 | await expect(ageInput.field).toHaveValue("30");
784 | });
785 |
786 | test("reset method resets form to initial state", async ({
787 | initTestBed,
788 | page,
789 | createFormItemDriver,
790 | createTextBoxDriver,
791 | }) => {
792 | await initTestBed(`
793 | <Form
794 | id="testForm"
795 | data="{{ name: 'Initial' }}">
796 | <FormItem label="Name" bindTo="name" testId="nameField" />
797 | <Button onClick="testForm.reset()" label="Reset" />
798 | </Form>
799 | `);
800 |
801 | const nameDriver = await createFormItemDriver("nameField");
802 | const nameInput = await createTextBoxDriver(nameDriver.input);
803 |
804 | // Change the input value
805 | await nameInput.field.fill("Changed");
806 | await expect(nameInput.field).toHaveValue("Changed");
807 |
808 | // Reset the form
809 | await page.getByRole("button", { name: "Reset" }).click();
810 |
811 | await expect(nameInput.field).toHaveValue("Initial");
812 | });
813 | });
814 |
815 | // =============================================================================
816 | // CONTEXT VARIABLE TESTS
817 | // =============================================================================
818 |
819 | test.describe("Context Variables", () => {
820 | test("$data context variable provides access to form data", async ({
821 | initTestBed,
822 | page,
823 | createFormItemDriver,
824 | }) => {
825 | // This test needs specific FormItem behavior that may vary
826 | await initTestBed(`
827 | <Form data="{{ isEnabled: true, name: 'Joe' }}">
828 | <FormItem testId="isEnabled" label="Enable name" bindTo="isEnabled" type="checkbox" />
829 | <FormItem testId="name" enabled="{$data.isEnabled}" label="Name" bindTo="name" />
830 | </Form>
831 | `);
832 |
833 | const enableSwitch = (await createFormItemDriver("isEnabled")).checkbox;
834 | const nameInput = (await createFormItemDriver("name")).textBox;
835 |
836 | await expect(enableSwitch).toBeVisible();
837 | await expect(nameInput).toBeEnabled();
838 | await enableSwitch.click();
839 | await expect(nameInput).toBeDisabled();
840 | });
841 |
842 | test("$data.update method updates form data", async ({
843 | initTestBed,
844 | page,
845 | createFormItemDriver,
846 | }) => {
847 | await initTestBed(`
848 | <Form data="{{ counter: 0 }}">
849 | <FormItem testId="counter" label="Counter" bindTo="counter" type="integer" />
850 | <Button onClick="$data.update({ counter: $data.counter + 1 })" label="Increment" />
851 | </Form>
852 | `);
853 |
854 | const counterDriver = await createFormItemDriver("counter");
855 | const counterInput = counterDriver.textBox;
856 | await expect(counterInput).toHaveValue("0");
857 |
858 | await page.getByRole("button", { name: "Increment" }).click({ force: true });
859 |
860 | await expect(counterInput).toHaveValue("1");
861 | });
862 | });
863 |
864 | // =============================================================================
865 | // SUBMIT URL AND METHOD TESTS
866 | // =============================================================================
867 |
868 | test.describe("Submit URL and Method", () => {
869 | test("submits to custom URL with POST method (new date)", async ({
870 | initTestBed,
871 | createFormDriver,
872 | }) => {
873 | await initTestBed(
874 | `<App><Form testId="form" submitUrl="/custom-endpoint" data="{null}">
875 | <FormItem label="Name" bindTo="name" />
876 | </Form></App>`,
877 | {
878 | apiInterceptor: {
879 | operations: {
880 | customEndpoint: {
881 | url: "/custom-endpoint",
882 | method: "post",
883 | handler: `return { success: true };`,
884 | },
885 | },
886 | },
887 | },
888 | );
889 |
890 | const driver = await createFormDriver("form");
891 | await driver.submitForm();
892 |
893 | const response = await driver.getSubmitResponse("/custom-endpoint");
894 | expect(response.ok()).toEqual(true);
895 | });
896 |
897 | test("uses PUT method for existing data", async ({ initTestBed, createFormDriver }) => {
898 | await initTestBed(
899 | `<Form submitUrl="/entities/1" data="{{ id: 1, name: 'Existing' }}">
900 | <FormItem label="Name" bindTo="name" />
901 | </Form>`,
902 | {
903 | apiInterceptor: {
904 | operations: {
905 | updateEntity: {
906 | url: "/entities/1",
907 | method: "put",
908 | handler: `return { success: true };`,
909 | },
910 | },
911 | },
912 | },
913 | );
914 |
915 | const driver = await createFormDriver();
916 | await driver.submitForm();
917 |
918 | const response = await driver.getSubmitResponse("/entities/1");
919 | expect(response.ok()).toEqual(true);
920 | });
921 |
922 | test("uses custom submit method", async ({ initTestBed, createFormDriver }) => {
923 | await initTestBed(
924 | `<Form submitUrl="/custom" submitMethod="put" data="{{ name: 'Test' }}">
925 | <FormItem label="Name" bindTo="name" />
926 | </Form>`,
927 | {
928 | apiInterceptor: {
929 | operations: {
930 | putCustom: {
931 | url: "/custom",
932 | method: "put",
933 | handler: `return { success: true };`,
934 | },
935 | },
936 | },
937 | },
938 | );
939 |
940 | const driver = await createFormDriver();
941 | await driver.submitForm();
942 |
943 | const response = await driver.getSubmitResponse("/custom");
944 | expect(response.ok()).toEqual(true);
945 | });
946 | });
947 | });
948 |
949 | // =============================================================================
950 | // ACCESSIBILITY TESTS
951 | // =============================================================================
952 |
953 | test.describe("Accessibility", () => {
954 | test("form has correct semantic role", async ({ initTestBed, page }) => {
955 | await initTestBed(`<Form/>`);
956 | await expect(page.locator("form")).toBeVisible();
957 | });
958 |
959 | test("form items are properly associated with labels", async ({
960 | initTestBed,
961 | createFormItemDriver,
962 | }) => {
963 | await initTestBed(`
964 | <Form>
965 | <FormItem label="Full Name" bindTo="name" testId="nameField" />
966 | </Form>
967 | `);
968 |
969 | const driver = await createFormItemDriver("nameField");
970 | await expect(driver.label).toBeVisible();
971 | await expect(driver.label).toHaveText("Full Name");
972 | });
973 |
974 | test("form submission is keyboard accessible", async ({ initTestBed, page }) => {
975 | const { testStateDriver } = await initTestBed(`
976 | <Form onSubmit="testState = 'submitted via keyboard'">
977 | <FormItem label="Name" bindTo="name" />
978 | </Form>
979 | `);
980 |
981 | const submitButton = page.getByRole("button", { name: "Save" });
982 | await submitButton.focus();
983 | await page.keyboard.press("Enter");
984 |
985 | await expect.poll(testStateDriver.testState).toEqual("submitted via keyboard");
986 | });
987 |
988 | test("form cancel is keyboard accessible", async ({ initTestBed, page }) => {
989 | const { testStateDriver } = await initTestBed(`
990 | <Form onCancel="testState = 'cancelled via keyboard'">
991 | <FormItem label="Name" bindTo="name" />
992 | </Form>
993 | `);
994 |
995 | const cancelButton = page.getByRole("button", { name: "Cancel" });
996 | await cancelButton.focus();
997 | await page.keyboard.press("Enter");
998 |
999 | await expect.poll(testStateDriver.testState).toEqual("cancelled via keyboard");
1000 | });
1001 |
1002 | test("disabled form buttons are properly disabled", async ({ initTestBed, page }) => {
1003 | await initTestBed(`
1004 | <Form enabled="false">
1005 | <FormItem label="Name" bindTo="name" />
1006 | </Form>
1007 | `);
1008 |
1009 | const saveButton = page.getByRole("button", { name: "Save" });
1010 | await expect(saveButton).toBeDisabled();
1011 | });
1012 | });
1013 |
1014 | // =============================================================================
1015 | // THEME VARIABLE TESTS
1016 | // =============================================================================
1017 |
1018 | test.describe("Theme Variables", () => {
1019 | test("applies custom gap theme variable", async ({ initTestBed, createFormDriver }) => {
1020 | await initTestBed(`<Form testId="form"/>`, {
1021 | testThemeVars: {
1022 | "gap-Form": "2rem",
1023 | },
1024 | });
1025 |
1026 | const driver = await createFormDriver("form");
1027 | await expect(driver.component).toHaveCSS("gap", "32px");
1028 | });
1029 |
1030 | test("applies custom button row gap theme variable", async ({
1031 | initTestBed,
1032 | createFormDriver,
1033 | }) => {
1034 | await initTestBed(`<Form testId="form"/>`, {
1035 | testThemeVars: {
1036 | "gap-buttonRow-Form": "1rem",
1037 | },
1038 | });
1039 |
1040 | const driver = await createFormDriver("form");
1041 | await expect(driver.component).toBeVisible();
1042 | });
1043 |
1044 | test("applies validation display theme variables", async ({ initTestBed, page }) => {
1045 | // This test requires validation system to trigger error display
1046 | await initTestBed(
1047 | `
1048 | <Form>
1049 | <FormItem testId="email" label="Email" bindTo="email" type="email" required="true" />
1050 | </Form>
1051 | `,
1052 | {
1053 | testThemeVars: {
1054 | "backgroundColor-ValidationDisplay-error": "rgb(255, 0, 0)",
1055 | "textColor-ValidationDisplay-error": "rgb(255, 255, 255)",
1056 | },
1057 | },
1058 | );
1059 |
1060 | // Trigger validation by submitting with empty required field
1061 | await page.getByRole("button", { name: "Save" }).click();
1062 |
1063 | const emailComp = page.getByTestId("email");
1064 | await expect(emailComp).toContainText("This field is required");
1065 | });
1066 | });
1067 |
1068 | // =============================================================================
1069 | // EDGE CASES TESTS
1070 | // =============================================================================
1071 |
1072 | test.describe("Edge Cases", () => {
1073 | test("handles form without any form items", async ({ initTestBed, createFormDriver }) => {
1074 | await initTestBed(`<Form testId="form"/>`);
1075 | const driver = await createFormDriver("form");
1076 | await expect(driver.component).toBeVisible();
1077 | });
1078 |
1079 | test("handles malformed data input gracefully", async ({ initTestBed, createFormDriver }) => {
1080 | await initTestBed(`<Form data="{invalidJson}" testId="form"/>`);
1081 | const driver = await createFormDriver("form");
1082 | await expect(driver.component).toBeVisible();
1083 | });
1084 |
1085 | test("Form does not render if data receives malformed input", async ({
1086 | initTestBed,
1087 | createFormDriver,
1088 | }) => {
1089 | await initTestBed(`<Form data="{}" />`);
1090 | await expect((await createFormDriver()).component).not.toBeAttached();
1091 | });
1092 |
1093 | test("handles deeply nested data structure", async ({
1094 | initTestBed,
1095 | createFormItemDriver,
1096 | createTextBoxDriver,
1097 | }) => {
1098 | await initTestBed(`
1099 | <Form data="{{ user: { profile: { name: 'John' } } }}">
1100 | <FormItem label="Name" bindTo="user.profile.name" testId="nameField" />
1101 | </Form>
1102 | `);
1103 |
1104 | const driver = await createFormItemDriver("nameField");
1105 | const input = await createTextBoxDriver(driver.input);
1106 | await expect(input.field).toHaveValue("John");
1107 | });
1108 |
1109 | test("handles form with validation errors", async ({ initTestBed, page }) => {
1110 | await initTestBed(`
1111 | <Form>
1112 | <FormItem label="Email" bindTo="email" type="email" required="true" />
1113 | </Form>
1114 | `);
1115 |
1116 | // Try to submit form without filling required field
1117 | await page.getByRole("button", { name: "Save" }).click();
1118 |
1119 | // Validation should prevent submission and show error
1120 | const form = page.locator("form");
1121 | await expect(form).toBeVisible();
1122 | });
1123 |
1124 | test("handles rapid form submissions", async ({ initTestBed, page }) => {
1125 | const { testStateDriver } = await initTestBed(`
1126 | <Form onSubmit="testState = (testState || 0) + 1">
1127 | <FormItem label="Name" bindTo="name" />
1128 | </Form>
1129 | `);
1130 |
1131 | const submitButton = page.getByRole("button", { name: "Save" });
1132 |
1133 | // Click submit button multiple times rapidly
1134 | await submitButton.click();
1135 | await submitButton.click();
1136 | await submitButton.click();
1137 |
1138 | // Should only submit once or handle gracefully
1139 | await expect.poll(testStateDriver.testState).toBeGreaterThanOrEqual(1);
1140 | });
1141 |
1142 | test("handles null and undefined in nested data", async ({
1143 | initTestBed,
1144 | createFormItemDriver,
1145 | createTextBoxDriver,
1146 | }) => {
1147 | await initTestBed(`
1148 | <Form data="{{ user: null, settings: undefined, name: 'Test' }}">
1149 | <FormItem label="Name" bindTo="name" testId="nameField" />
1150 | </Form>
1151 | `);
1152 |
1153 | const driver = await createFormItemDriver("nameField");
1154 | const input = await createTextBoxDriver(driver.input);
1155 | await expect(input.field).toHaveValue("Test");
1156 | });
1157 |
1158 | test("handles form with empty string properties", async ({ initTestBed, page }) => {
1159 | await initTestBed(`
1160 | <Form
1161 | cancelLabel=""
1162 | saveLabel=""
1163 | data="{{ name: '' }}">
1164 | <FormItem label="Name" bindTo="name" />
1165 | </Form>
1166 | `);
1167 |
1168 | // Form should still be visible
1169 | const form = page.locator("form");
1170 | await expect(form).toBeVisible();
1171 | });
1172 |
1173 | test("handles special characters in form data", async ({
1174 | initTestBed,
1175 | createFormItemDriver,
1176 | createTextBoxDriver,
1177 | }) => {
1178 | await initTestBed(`
1179 | <Form data="{{ name: 'José María', description: 'Test & symbols' }}">
1180 | <FormItem label="Name" bindTo="name" testId="nameField" />
1181 | <FormItem label="Description" bindTo="description" testId="descField" />
1182 | </Form>
1183 | `);
1184 |
1185 | const nameDriver = await createFormItemDriver("nameField");
1186 | const nameInput = await createTextBoxDriver(nameDriver.input);
1187 | const descDriver = await createFormItemDriver("descField");
1188 | const descInput = await createTextBoxDriver(descDriver.input);
1189 |
1190 | await expect(nameInput.field).toHaveValue("José María");
1191 | await expect(descInput.field).toHaveValue("Test & symbols");
1192 | });
1193 |
1194 | test("user cannot submit with clientside errors present", async ({
1195 | initTestBed,
1196 | createFormDriver,
1197 | }) => {
1198 | const { testStateDriver } = await initTestBed(`
1199 | <Form onSubmit="testState = true">
1200 | <FormItem bindTo="name" required="true" />
1201 | </Form>
1202 | `);
1203 | const driver = await createFormDriver();
1204 |
1205 | // The onSubmit event should have been triggered if not for the client error of an empty required field
1206 | await driver.submitForm("click");
1207 | await expect.poll(testStateDriver.testState).toEqual(null);
1208 | });
1209 |
1210 | test("can submit with invisible required field", async ({
1211 | initTestBed,
1212 | createFormDriver,
1213 | createFormItemDriver,
1214 | createTextBoxDriver,
1215 | page,
1216 | }) => {
1217 | const { testStateDriver } = await initTestBed(`
1218 | <Form onSubmit="testState = true">
1219 | <FormItem testId="select" bindTo="authenticationType"
1220 | type="select" label="Authentication Type:" initialValue="{0}">
1221 | <Option value="{0}" label="Password" />
1222 | <Option value="{1}" label="Public Key" />
1223 | </FormItem>
1224 | <FormItem label="name1" testId="name1" bindTo="name1"
1225 | required="true" when="{$data.authenticationType == 0}"/>
1226 | <FormItem label="name2" testId="name2" bindTo="name2"
1227 | required="true" when="{$data.authenticationType == 1}"/>
1228 | </Form>
1229 | `);
1230 | const formDriver = await createFormDriver();
1231 | const selectDriver = await createFormItemDriver("select");
1232 | const textfieldElement = (await createFormItemDriver("name2")).input;
1233 | const textfieldDriver = await createTextBoxDriver(textfieldElement);
1234 |
1235 | await selectDriver.component.click();
1236 | await page.getByText("Public Key").click();
1237 | await textfieldDriver.field.fill("John");
1238 | await formDriver.submitForm();
1239 |
1240 | await expect.poll(testStateDriver.testState).toEqual(true);
1241 | });
1242 |
1243 | test("conditional fields keep the state", async ({
1244 | initTestBed,
1245 | createFormItemDriver,
1246 | createOptionDriver,
1247 | createTextBoxDriver,
1248 | }) => {
1249 | await initTestBed(`
1250 | <Form>
1251 | <FormItem testId="select" bindTo="authenticationType"
1252 | type="radioGroup" label="Authentication Type:" initialValue="{0}">
1253 | <Option value="{0}" label="Password" testId="password"/>
1254 | <Option value="{1}" label="Public Key" testId="publicKey" />
1255 | </FormItem>
1256 | <FormItem label="name1" testId="name1" bindTo="name1"
1257 | required="true" when="{$data.authenticationType == 0}"/>
1258 | <FormItem label="name2" testId="name2" bindTo="name2"
1259 | required="true" when="{$data.authenticationType == 1}"/>
1260 | </Form>
1261 | `);
1262 | const option1Driver = await createFormItemDriver("password");
1263 | const option2Driver = await createOptionDriver("publicKey");
1264 | const textfield1Element = (await createFormItemDriver("name1")).input;
1265 | const textfield1Driver = await createTextBoxDriver(textfield1Element);
1266 |
1267 | // Fill in first field
1268 | await textfield1Driver.field.fill("Test Value");
1269 | await expect(textfield1Driver.field).toHaveValue("Test Value");
1270 |
1271 | // Switch to second option
1272 | await option2Driver.component.click();
1273 |
1274 | // Switch back to first option
1275 | await option1Driver.component.click();
1276 |
1277 | // Field should retain its value
1278 | await expect(textfield1Driver.field).toHaveValue("Test Value");
1279 | });
1280 | });
1281 |
1282 | // =============================================================================
1283 | // ORIGINAL TEST SUITE (LEGACY TESTS)
1284 | // =============================================================================
1285 |
1286 | test("mock service responds", async ({ initTestBed, createFormDriver }) => {
1287 | await initTestBed(
1288 | `
1289 | <Form submitUrl="/test" />`,
1290 | {
1291 | apiInterceptor: {
1292 | operations: {
1293 | test: {
1294 | url: "/test",
1295 | method: "post",
1296 | handler: `return true;`,
1297 | },
1298 | },
1299 | },
1300 | },
1301 | );
1302 | const driver = await createFormDriver();
1303 | await driver.submitForm();
1304 |
1305 | const request = await driver.getSubmitResponse("/test");
1306 | expect(request.ok()).toEqual(true);
1307 | });
1308 |
1309 | // --- $data
1310 |
1311 | test("$data is correctly bound to form data", async ({ initTestBed, createButtonDriver }) => {
1312 | await initTestBed(`
1313 | <Form data="{{ field: 'test' }}">
1314 | <FormItem label="testField" bindTo="field">
1315 | <Button testId="custom" label="{$data.field}" />
1316 | </FormItem>
1317 | </Form> `);
1318 | const driver = await createButtonDriver("custom");
1319 | await expect(driver.component).toHaveExplicitLabel("test");
1320 | });
1321 |
1322 | test("$data is correctly undefined if data is not set in props", async ({
1323 | initTestBed,
1324 | createButtonDriver,
1325 | }) => {
1326 | await initTestBed(`
1327 | <Form>
1328 | <FormItem label="testField" bindTo="field">
1329 | <Button testId="custom" label="{$data.field}" />
1330 | </FormItem>
1331 | </Form> `);
1332 | const driver = await createButtonDriver("custom");
1333 | await expect(driver.component).toHaveExplicitLabel(undefined);
1334 | });
1335 |
1336 | test("Form buttons and contained FormItems are enabled", async ({
1337 | initTestBed,
1338 | page,
1339 | createFormDriver,
1340 | }) => {
1341 | await initTestBed(`
1342 | <Form testId="form">
1343 | <FormItem label="Name" bindTo="name" />
1344 | <FormItem label="Email" bindTo="email" />
1345 | </Form>
1346 | `);
1347 |
1348 | const driver = await createFormDriver("form");
1349 | await expect(page.getByText("Name")).toBeVisible();
1350 | await expect(page.getByText("Email")).toBeVisible();
1351 | await expect(driver.cancelButton).toBeEnabled();
1352 | await expect(driver.submitButton).toBeEnabled();
1353 | });
1354 |
1355 | test("submit only triggers when enabled", async ({ initTestBed, createFormDriver }) => {
1356 | const { testStateDriver } = await initTestBed(
1357 | `
1358 | <Form enabled="false" data="{{ name: 'John' }}" onSubmit="testState = true">
1359 | <FormItem bindTo="name" />
1360 | </Form>`,
1361 | );
1362 | const driver = await createFormDriver();
1363 | await expect(driver.submitButton).toBeDisabled();
1364 |
1365 | await driver.submitForm("keypress");
1366 | await expect.poll(testStateDriver.testState).toEqual(null);
1367 | });
1368 |
1369 | test("submit with unbound fields", async ({ page, initTestBed, createFormDriver }) => {
1370 | await initTestBed(`
1371 | <Fragment var.output="none">
1372 | <Form testId="form"
1373 | data="{{ firstname: 'James', lastname: 'Clewell' }}"
1374 | onSubmit="args => output = JSON.stringify(args)">
1375 | <FormItem label="Firstname" bindTo="firstname" />
1376 | <FormItem label="Middle name" initialValue="Robert" />
1377 | <FormItem label="Lastname" />
1378 | </Form>
1379 | <Text testId="text">{output}</Text>
1380 | </Fragment>
1381 | `);
1382 | const driver = await createFormDriver("form");
1383 | await driver.submitForm();
1384 | await expect(page.getByTestId("text")).toHaveText('{"firstname":"James"}');
1385 | });
1386 |
1387 | test(`submit with type 'items'`, async ({
1388 | initTestBed,
1389 | createFormDriver,
1390 | createButtonDriver,
1391 | createFormItemDriver,
1392 | }) => {
1393 | const { testStateDriver } = await initTestBed(`
1394 | <Form onSubmit="data => testState = data" testId="form">
1395 | <FormItem testId="formItem" type="items" bindTo="arrayItems" id="arrayItems">
1396 | <FormItem bindTo="name" testId="text{$itemIndex}"/>
1397 | </FormItem>
1398 | <Button testId="addButton" onClick="arrayItems.addItem()"/>
1399 | </Form>`);
1400 |
1401 | await (await createButtonDriver("addButton")).click();
1402 | await (await createFormItemDriver("text0")).textBox.fill("John");
1403 | await (await createButtonDriver("addButton")).click();
1404 | await (await createFormItemDriver("text1")).textBox.fill("Peter");
1405 | const driver = await createFormDriver("form");
1406 | await driver.submitForm();
1407 | await expect.poll(testStateDriver.testState).toStrictEqual({
1408 | arrayItems: [{ name: "John" }, { name: "Peter" }],
1409 | });
1410 | });
1411 |
1412 | test(`submit with type 'items', empty bindTo`, async ({
1413 | initTestBed,
1414 | createFormDriver,
1415 | createButtonDriver,
1416 | createFormItemDriver,
1417 | }) => {
1418 | const { testStateDriver } = await initTestBed(`
1419 | <Form onSubmit="data => testState = data" testId="form">
1420 | <FormItem testId="formItem" type="items" bindTo="arrayItems" id="arrayItems">
1421 | <FormItem testId="text{$itemIndex}" bindTo=""/>
1422 | </FormItem>
1423 | <Button testId="addButton" onClick="arrayItems.addItem()"/>
1424 | </Form>`);
1425 |
1426 | await (await createButtonDriver("addButton")).click();
1427 | await (await createFormItemDriver("text0")).textBox.fill("John");
1428 | await (await createButtonDriver("addButton")).click();
1429 | await (await createFormItemDriver("text1")).textBox.fill("Peter");
1430 | const driver = await createFormDriver("form");
1431 | await driver.submitForm();
1432 | await expect.poll(testStateDriver.testState).toStrictEqual({
1433 | arrayItems: ["John", "Peter"],
1434 | });
1435 | });
1436 |
1437 | // --- Testing
1438 |
1439 | // --- --- buttonRowTemplate
1440 |
1441 | test("buttonRowTemplate can render buttons", async ({ initTestBed, createButtonDriver }) => {
1442 | await initTestBed(`
1443 | <Form>
1444 | <property name="buttonRowTemplate">
1445 | <Button testId="submitBtn" type="submit" label="Hello Button" />
1446 | </property>
1447 | </Form>`);
1448 | await expect((await createButtonDriver("submitBtn")).component).toBeAttached();
1449 | });
1450 |
1451 | test("buttonRowTemplate replaces built-in buttons", async ({ initTestBed, createFormDriver }) => {
1452 | await initTestBed(`
1453 | <Form testId="form">
1454 | <property name="buttonRowTemplate">
1455 | <Button testId="submitBtn" type="submit" label="Hello Button" />
1456 | </property>
1457 | </Form>`);
1458 |
1459 | const driver = await createFormDriver("form");
1460 | await expect(driver.submitButton).not.toBeVisible();
1461 | await expect(driver.cancelButton).not.toBeVisible();
1462 | });
1463 |
1464 | test("setting buttonRowTemplate without buttons still runs submit on Enter", async ({
1465 | initTestBed,
1466 | createFormDriver,
1467 | }) => {
1468 | const { testStateDriver } = await initTestBed(`
1469 | <Form onSubmit="testState = true">
1470 | <property name="buttonRowTemplate">
1471 | <Fragment />
1472 | </property>
1473 | <FormItem bindTo="name" />
1474 | </Form>
1475 | `);
1476 | const driver = await createFormDriver();
1477 |
1478 | await driver.submitForm("keypress");
1479 | await expect.poll(testStateDriver.testState).toBe(true);
1480 | });
1481 |
1482 | test("data accepts an object", async ({
1483 | initTestBed,
1484 | createFormItemDriver,
1485 | createTextBoxDriver,
1486 | }) => {
1487 | await initTestBed(`
1488 | <Form data="{{ field1: 'test' }}">
1489 | <FormItem testId="inputField" bindTo="field1" />
1490 | </Form>
1491 | `);
1492 | const driver = await createFormItemDriver("inputField");
1493 | await expect((await createTextBoxDriver(driver.input)).field).toHaveValue("test");
1494 | });
1495 |
1496 | test(`data accepts primitive`, async ({ initTestBed, createFormDriver }) => {
1497 | await initTestBed(`
1498 | <Form data="test">
1499 | <FormItem bindTo="field1" />
1500 | </Form>
1501 | `);
1502 | const component = (await createFormDriver()).component;
1503 | await expect(component).toBeAttached();
1504 | });
1505 |
1506 | test(`data accepts empty array`, async ({ initTestBed, createFormDriver }) => {
1507 | await initTestBed(`
1508 | <Form data="{[]}">
1509 | <FormItem bindTo="field1" />
1510 | </Form>
1511 | `);
1512 | const component = (await createFormDriver()).component;
1513 | await expect(component).toBeAttached();
1514 | });
1515 |
1516 | test("data accepts relative URL endpoint", async ({
1517 | initTestBed,
1518 | createFormItemDriver,
1519 | createTextBoxDriver,
1520 | }) => {
1521 | await initTestBed(
1522 | `
1523 | <Form data="/test">
1524 | <FormItem testId="inputField" bindTo="name" />
1525 | </Form>`,
1526 | {
1527 | apiInterceptor: {
1528 | operations: {
1529 | test: {
1530 | url: "/test",
1531 | method: "get",
1532 | handler: `return { name: 'John' };`,
1533 | },
1534 | },
1535 | },
1536 | },
1537 | );
1538 | const driver = await createFormItemDriver("inputField");
1539 | await expect((await createTextBoxDriver(driver.input)).field).toHaveValue("John");
1540 | });
1541 |
1542 | test("cancel button and save button use default label", async ({
1543 | initTestBed,
1544 | createFormDriver,
1545 | }) => {
1546 | await initTestBed(`
1547 | <Form testId="form">
1548 | <FormItem label="Name" bindTo="name" />
1549 | <FormItem label="Email" bindTo="email" />
1550 | </Form>
1551 | `);
1552 |
1553 | const driver = await createFormDriver("form");
1554 | await expect(driver.cancelButton).toHaveText("Cancel");
1555 | await expect(driver.submitButton).toHaveText("Save");
1556 | });
1557 |
1558 | test("cancel button is rendered with cancelLabel", async ({ initTestBed, createFormDriver }) => {
1559 | await initTestBed(`
1560 | <Form testId="form" cancelLabel="Abort">
1561 | <FormItem label="Name" bindTo="name" />
1562 | <FormItem label="Email" bindTo="email" />
1563 | </Form>
1564 | `);
1565 |
1566 | const driver = await createFormDriver("form");
1567 | await expect(driver.cancelButton).toHaveText("Abort");
1568 | await expect(driver.submitButton).toHaveText("Save");
1569 | });
1570 |
1571 | test("save button is rendered with saveLabel", async ({ initTestBed, createFormDriver }) => {
1572 | await initTestBed(`
1573 | <Form testId="form" saveLabel="Submit">
1574 | <FormItem label="Name" bindTo="name" />
1575 | <FormItem label="Email" bindTo="email" />
1576 | </Form>
1577 | `);
1578 |
1579 | const driver = await createFormDriver("form");
1580 | await expect(driver.cancelButton).toHaveText("Cancel");
1581 | await expect(driver.submitButton).toHaveText("Submit");
1582 | });
1583 |
1584 | // swapCancelAndSave
1585 |
1586 | test("built-in button row order is default if swapCancelAndSave is false", async ({
1587 | initTestBed,
1588 | createFormDriver,
1589 | }) => {
1590 | await initTestBed(`
1591 | <Form testId="form" saveLabel="Submit">
1592 | <FormItem label="Name" bindTo="name" />
1593 | <FormItem label="Email" bindTo="email" />
1594 | </Form>
1595 | `);
1596 |
1597 | const driver = await createFormDriver("form");
1598 | const cancelBox = await driver.cancelButton.boundingBox();
1599 | const submitBox = await driver.submitButton.boundingBox();
1600 | expect(cancelBox.x).toBeLessThan(submitBox.x);
1601 | });
1602 |
1603 | test("built-in button row order flips if swapCancelAndSave is true", async ({
1604 | initTestBed,
1605 | createFormDriver,
1606 | }) => {
1607 | await initTestBed(`
1608 | <Form testId="form" saveLabel="Submit" swapCancelAndSave="true">
1609 | <FormItem label="Name" bindTo="name" />
1610 | <FormItem label="Email" bindTo="email" />
1611 | </Form>
1612 | `);
1613 |
1614 | const driver = await createFormDriver("form");
1615 | const cancelBox = await driver.cancelButton.boundingBox();
1616 | const submitBox = await driver.submitButton.boundingBox();
1617 | expect(cancelBox.x).toBeGreaterThan(submitBox.x);
1618 | });
1619 |
1620 | // --- submitUrl
1621 |
1622 | test("form submits to correct url", async ({ initTestBed, createFormDriver }) => {
1623 | const endpoint = "/test";
1624 | await initTestBed(
1625 | `
1626 | <Form data="{{ name: 'John' }}" submitUrl="${endpoint}" submitMethod="post">
1627 | <FormItem bindTo="name" />
1628 | </Form>`,
1629 | {
1630 | apiInterceptor: {
1631 | operations: {
1632 | test: {
1633 | url: endpoint,
1634 | method: "post",
1635 | handler: `{ return true; }`,
1636 | },
1637 | },
1638 | },
1639 | },
1640 | );
1641 | const driver = await createFormDriver();
1642 |
1643 | await driver.submitForm();
1644 | const response = await driver.getSubmitResponse(endpoint);
1645 | expect(response.ok()).toBe(true);
1646 | expect(new URL(response.url()).pathname).toBe(endpoint);
1647 | });
1648 |
1649 | // --- submitMethod
1650 |
1651 | // NOTE: GET doesn't work because GET/HEAD cannot have a 'body'
1652 | ["post", "put", "delete"].forEach((method) => {
1653 | test(`${method} REST op on submit`, async ({ initTestBed, createFormDriver }) => {
1654 | await initTestBed(`<Form submitUrl="/test" submitMethod="${method}" />`, {
1655 | apiInterceptor: {
1656 | operations: {
1657 | testPost: {
1658 | url: "/test",
1659 | method: "post",
1660 | handler: `return true;`,
1661 | },
1662 | testPut: {
1663 | url: "/test",
1664 | method: "put",
1665 | handler: `return true;`,
1666 | },
1667 | testDelete: {
1668 | url: "/test",
1669 | method: "delete",
1670 | handler: `return true;`,
1671 | },
1672 | },
1673 | },
1674 | });
1675 | const driver = await createFormDriver();
1676 | const request = await driver.getSubmitRequest("/test", method, "click");
1677 | expect(request.failure()).toBeNull();
1678 | });
1679 | });
1680 |
1681 | // --- submitting the Form
1682 |
1683 | test("submit triggers when clicking save/submit button", async ({
1684 | initTestBed,
1685 | createFormDriver,
1686 | }) => {
1687 | await initTestBed(
1688 | `
1689 | <Form data="{{ name: 'John' }}" submitUrl="/test" submitMethod="post">
1690 | <FormItem bindTo="name" />
1691 | </Form>`,
1692 | {
1693 | apiInterceptor: {
1694 | operations: {
1695 | test: {
1696 | url: "/test",
1697 | method: "post",
1698 | handler: `return true;`,
1699 | },
1700 | },
1701 | },
1702 | },
1703 | );
1704 | const driver = await createFormDriver();
1705 |
1706 | const request = await driver.getSubmitRequest("/test", "POST", "click");
1707 | expect(request.failure()).toBeNull();
1708 | });
1709 |
1710 | test("submit triggers when pressing Enter", async ({ initTestBed, createFormDriver }) => {
1711 | await initTestBed(
1712 | `
1713 | <Form data="{{ name: 'John' }}" submitUrl="/test" submitMethod="post">
1714 | <FormItem bindTo="name" />
1715 | </Form>`,
1716 | {
1717 | apiInterceptor: {
1718 | operations: {
1719 | test: {
1720 | url: "/test",
1721 | method: "post",
1722 | handler: `return true;`,
1723 | },
1724 | },
1725 | },
1726 | },
1727 | );
1728 | const driver = await createFormDriver();
1729 |
1730 | const request = await driver.getSubmitRequest("/test", "POST", "keypress");
1731 | expect(request.failure()).toBeNull();
1732 | });
1733 |
1734 | test("user cannot submit with clientside errors present", async ({
1735 | initTestBed,
1736 | createFormDriver,
1737 | }) => {
1738 | const { testStateDriver } = await initTestBed(`
1739 | <Form onSubmit="testState = true">
1740 | <FormItem bindTo="name" required="true" />
1741 | </Form>
1742 | `);
1743 | const driver = await createFormDriver();
1744 |
1745 | // The onSubmit event should have been triggered if not for the client error of an empty required field
1746 | await driver.submitForm("click");
1747 | await expect.poll(testStateDriver.testState).toEqual(null);
1748 | });
1749 |
1750 | // --- backend validation summary
1751 |
1752 | test("submitting with errors shows validation summary", async ({
1753 | initTestBed,
1754 | createFormDriver,
1755 | }) => {
1756 | await initTestBed(`<Form submitUrl="/general-validation-error" submitMethod="post" />`, {
1757 | apiInterceptor: errorDisplayInterceptor,
1758 | });
1759 | const driver = await createFormDriver();
1760 | await driver.submitForm();
1761 | await expect(await driver.getValidationSummary()).toBeVisible();
1762 | });
1763 |
1764 | test("submitting without errors does not show summary", async ({
1765 | initTestBed,
1766 | createFormDriver,
1767 | }) => {
1768 | await initTestBed(`<Form submitUrl="/no-validation-error" submitMethod="post" />`, {
1769 | apiInterceptor: errorDisplayInterceptor,
1770 | });
1771 | const driver = await createFormDriver();
1772 | await driver.submitForm();
1773 | await expect(await driver.getValidationSummary()).not.toBeVisible();
1774 | });
1775 |
1776 | test("general error messages are rendered in the summary", async ({
1777 | initTestBed,
1778 | createFormDriver,
1779 | createValidationDisplayDriver,
1780 | }) => {
1781 | await initTestBed(`<Form submitUrl="/general-validation-error" submitMethod="post" />`, {
1782 | apiInterceptor: errorDisplayInterceptor,
1783 | });
1784 | const formDriver = await createFormDriver();
1785 | await formDriver.submitForm();
1786 |
1787 | // TODO: strip this down -> it's verbose but hard to read
1788 | const warningDisplay = await createValidationDisplayDriver(
1789 | await formDriver.getValidationDisplaysBySeverity("warning"),
1790 | );
1791 | const errorDisplay = await createValidationDisplayDriver(
1792 | await formDriver.getValidationDisplaysBySeverity("error"),
1793 | );
1794 |
1795 | expect(await warningDisplay.getText()).toContain("Warning for the whole form");
1796 | expect(await errorDisplay.getText()).toContain("Error for the whole form");
1797 | });
1798 |
1799 | test("field-related errors are rendered at FormItems", async ({
1800 | initTestBed,
1801 | createFormDriver,
1802 | createFormItemDriver,
1803 | }) => {
1804 | await initTestBed(
1805 | `
1806 | <Form submitUrl="/field-validation-error" submitMethod="post">
1807 | <FormItem testId="testField" bindTo="test" label="test" />
1808 | </Form>`,
1809 | {
1810 | apiInterceptor: errorDisplayInterceptor,
1811 | },
1812 | );
1813 | const formDriver = await createFormDriver();
1814 | const fieldDriver = await createFormItemDriver("testField");
1815 |
1816 | await formDriver.submitForm();
1817 | await expect(fieldDriver.validationStatusIndicator).toHaveAttribute(
1818 | fieldDriver.validationStatusTag,
1819 | "warning",
1820 | );
1821 | });
1822 |
1823 | test("field-related errors map to correct FormItems", async ({
1824 | initTestBed,
1825 | createFormDriver,
1826 | createFormItemDriver,
1827 | }) => {
1828 | await initTestBed(
1829 | `
1830 | <Form submitUrl="/field-validation-error" submitMethod="post">
1831 | <FormItem testId="testField" bindTo="test" label="test" />
1832 | <FormItem testId="testField2" bindTo="test2" label="test2" />
1833 | </Form>`,
1834 | {
1835 | apiInterceptor: errorDisplayInterceptor,
1836 | },
1837 | );
1838 | const formDriver = await createFormDriver();
1839 | const fieldDriver = await createFormItemDriver("testField");
1840 |
1841 | await formDriver.submitForm();
1842 | await expect(fieldDriver.validationStatusIndicator).toHaveAttribute(
1843 | fieldDriver.validationStatusTag,
1844 | "warning",
1845 | );
1846 | });
1847 |
1848 | test.skip("field-related errors disappear if user updates FormItems", async ({
1849 | initTestBed,
1850 | page,
1851 | createFormItemDriver,
1852 | }) => {
1853 | await initTestBed(
1854 | `
1855 | <Form testId="form">
1856 | <FormItem testId="testField" bindTo="test" label="test" required />
1857 | <FormItem testId="testField2" bindTo="test2" label="test2" />
1858 | </Form>`,
1859 | );
1860 |
1861 | const fieldDriver = await createFormItemDriver("testField");
1862 | const fieldDriver2 = await createFormItemDriver("testField2");
1863 |
1864 | await fieldDriver.component.focus();
1865 | await fieldDriver.textBox.fill("a");
1866 | await fieldDriver.textBox.fill("");
1867 | await fieldDriver.textBox.blur();
1868 |
1869 | // Should show required error now
1870 | await expect(fieldDriver.textBox).toHaveValue("");
1871 | await expect(fieldDriver.validationStatusIndicator).toHaveAttribute(
1872 | fieldDriver.validationStatusTag,
1873 | "error",
1874 | );
1875 |
1876 | await fieldDriver.textBox.fill("a");
1877 | await fieldDriver.textBox.blur();
1878 |
1879 | await fieldDriver2.textBox.focus();
1880 |
1881 | await expect(fieldDriver2.textBox).toBeFocused();
1882 |
1883 | await fieldDriver2.textBox.fill("b");
1884 | await expect(fieldDriver.validationStatusIndicator).not.toBeVisible();
1885 | });
1886 |
1887 | const smartCrudInterceptor: ApiInterceptorDefinition = {
1888 | initialize: `
1889 | $state.items = {
1890 | [10]: { name: "Smith", id: 10 }
1891 | };
1892 | $state.currentId = 10;
1893 | `,
1894 | operations: {
1895 | create: {
1896 | url: "/entities",
1897 | method: "post",
1898 | handler: `() => {
1899 | $state.currentId++;
1900 | $state.items[$state.currentId] = $requestBody;
1901 | $state.items[$state.currentId].id = $state.currentId;
1902 |
1903 | return $state.items[$state.currentId];
1904 | }`,
1905 | },
1906 | read: {
1907 | url: "/entities/:id",
1908 | method: "get",
1909 | handler: `() => {
1910 | return $state.items[$pathParams.id];
1911 | }`,
1912 | },
1913 | update: {
1914 | url: "/entities/:id",
1915 | method: "put",
1916 | handler: `() => {
1917 | $state.items[$pathParams.id] = { ...$state.items[$pathParams.id], ...$requestBody };
1918 | return $state.items[$pathParams.id];
1919 | }`,
1920 | },
1921 | },
1922 | };
1923 |
1924 | test("create form works with submitUrl", async ({
1925 | initTestBed,
1926 | createFormDriver,
1927 | createFormItemDriver,
1928 | createTextBoxDriver,
1929 | }) => {
1930 | await initTestBed(
1931 | `
1932 | <Form submitUrl="/entities">
1933 | <FormItem bindTo="name" testId="nameInput"/>
1934 | </Form>
1935 | `,
1936 | { apiInterceptor: smartCrudInterceptor },
1937 | );
1938 | const formDriver = await createFormDriver();
1939 | const inputElement = (await createFormItemDriver("nameInput")).input;
1940 | const fieldDriver = await createTextBoxDriver(inputElement);
1941 |
1942 | await fieldDriver.field.fill("John");
1943 | await formDriver.submitForm("click");
1944 |
1945 | const response = await formDriver.getSubmitResponse();
1946 | expect(await response.json()).toEqual({
1947 | name: "John",
1948 | id: 11,
1949 | });
1950 | });
1951 |
1952 | test("regression: data url through modal context", async ({
1953 | initTestBed,
1954 | createButtonDriver,
1955 | createFormDriver,
1956 | createFormItemDriver,
1957 | createTextBoxDriver,
1958 | }) => {
1959 | await initTestBed(
1960 | `
1961 | <Fragment>
1962 | <Button testId="openModalButton" onClick="modal.open({data: '/entities/10'})"/>
1963 | <ModalDialog id="modal">
1964 | <Form testId="modalForm" data="{$param.data}" submitUrl="{$param.submitUrl}">
1965 | <FormItem bindTo="name" testId="nameInput"/>
1966 | </Form>
1967 | </ModalDialog>
1968 | </Fragment>
1969 | `,
1970 | {
1971 | apiInterceptor: smartCrudInterceptor,
1972 | },
1973 | );
1974 | const formDriver = await createFormDriver("modalForm");
1975 | const inputElement = (await createFormItemDriver("nameInput")).input;
1976 | const inputDriver = await createTextBoxDriver(inputElement);
1977 |
1978 | await (await createButtonDriver("openModalButton")).click();
1979 |
1980 | await expect(inputDriver.field).toHaveValue("Smith");
1981 |
1982 | await inputDriver.field.fill("EDITED-Smith");
1983 | await formDriver.submitForm("click");
1984 |
1985 | const response = await formDriver.getSubmitResponse();
1986 | expect(await response.json()).toEqual({
1987 | name: "EDITED-Smith",
1988 | id: 10,
1989 | });
1990 | });
1991 |
1992 | // --- Conditional Rendering Cases
1993 |
1994 | test("can submit with invisible required field", async ({
1995 | initTestBed,
1996 | createFormDriver,
1997 | createFormItemDriver,
1998 | createTextBoxDriver,
1999 | page,
2000 | }) => {
2001 | const { testStateDriver } = await initTestBed(`
2002 | <Form onSubmit="testState = true">
2003 | <FormItem testId="select" bindTo="authenticationType"
2004 | type="select" label="Authentication Type:" initialValue="{0}">
2005 | <Option value="{0}" label="Password" />
2006 | <Option value="{1}" label="Public Key" />
2007 | </FormItem>
2008 | <FormItem label="name1" testId="name1" bindTo="name1"
2009 | required="true" when="{$data.authenticationType == 0}"/>
2010 | <FormItem label="name2" testId="name2" bindTo="name2"
2011 | required="true" when="{$data.authenticationType == 1}"/>
2012 | </Form>
2013 | `);
2014 | const formDriver = await createFormDriver();
2015 | const selectDriver = await createFormItemDriver("select");
2016 | const textfieldElement = (await createFormItemDriver("name2")).input;
2017 | const textfieldDriver = await createTextBoxDriver(textfieldElement);
2018 |
2019 | await selectDriver.component.click();
2020 | await page.getByText("Public Key").click();
2021 | await textfieldDriver.field.fill("John");
2022 | await formDriver.submitForm();
2023 |
2024 | await expect.poll(testStateDriver.testState).toEqual(true);
2025 | });
2026 |
2027 | test("conditional fields keep the state", async ({
2028 | initTestBed,
2029 | createFormItemDriver,
2030 | createOptionDriver,
2031 | createTextBoxDriver,
2032 | }) => {
2033 | await initTestBed(`
2034 | <Form>
2035 | <FormItem testId="select" bindTo="authenticationType"
2036 | type="radioGroup" label="Authentication Type:" initialValue="{0}">
2037 | <Option value="{0}" label="Password" testId="password"/>
2038 | <Option value="{1}" label="Public Key" testId="publicKey" />
2039 | </FormItem>
2040 | <FormItem label="name1" testId="name1" bindTo="name1"
2041 | required="true" when="{$data.authenticationType == 0}"/>
2042 | <FormItem label="name2" testId="name2" bindTo="name2"
2043 | required="true" when="{$data.authenticationType == 1}"/>
2044 | </Form>
2045 | `);
2046 | const option1Driver = await createFormItemDriver("password");
2047 | const option2Driver = await createOptionDriver("publicKey");
2048 | const textfield1Element = (await createFormItemDriver("name1")).input;
2049 | const textfield1Driver = await createTextBoxDriver(textfield1Element);
2050 | const textfield2Element = (await createFormItemDriver("name2")).input;
2051 | const textfield2Driver = await createTextBoxDriver(textfield2Element);
2052 |
2053 | await textfield1Driver.field.fill("name1");
2054 | await option2Driver.click();
2055 | await textfield2Driver.field.fill("name2");
2056 | await option1Driver.click();
2057 |
2058 | await expect(textfield1Driver.field).toHaveValue("name1");
2059 | });
2060 |
```